From kwrobot at kitware.com Sun Jan 1 00:01:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 1 Jan 2017 00:01:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-920-gea0db79 Message-ID: <20170101050107.B392DFA103@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ea0db79e65fb943381c8a3358fd18ba2516e29bd (commit) from fbf0f0b3b6a2a6c7cfd8bc7eca2cfbd0263670f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea0db79e65fb943381c8a3358fd18ba2516e29bd commit ea0db79e65fb943381c8a3358fd18ba2516e29bd Author: Kitware Robot AuthorDate: Sun Jan 1 00:01:03 2017 -0500 Commit: Kitware Robot CommitDate: Sun Jan 1 00:01:03 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a76da12..7614110 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 20161231) +set(CMake_VERSION_PATCH 20170101) #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 Jan 2 00:01:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 2 Jan 2017 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-921-gc8084b3 Message-ID: <20170102050109.CC044FA5FF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c8084b3020b51150ecb5b1dc3b91758b171c93f4 (commit) from ea0db79e65fb943381c8a3358fd18ba2516e29bd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8084b3020b51150ecb5b1dc3b91758b171c93f4 commit c8084b3020b51150ecb5b1dc3b91758b171c93f4 Author: Kitware Robot AuthorDate: Mon Jan 2 00:01:06 2017 -0500 Commit: Kitware Robot CommitDate: Mon Jan 2 00:01:06 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7614110..e92bafa 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 20170101) +set(CMake_VERSION_PATCH 20170102) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jan 3 00:01:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 3 Jan 2017 00:01:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-922-gbd9b53a Message-ID: <20170103050107.68A4EFA637@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via bd9b53ab33bb2185d526e8897cbd8f95c680b2c7 (commit) from c8084b3020b51150ecb5b1dc3b91758b171c93f4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd9b53ab33bb2185d526e8897cbd8f95c680b2c7 commit bd9b53ab33bb2185d526e8897cbd8f95c680b2c7 Author: Kitware Robot AuthorDate: Tue Jan 3 00:01:04 2017 -0500 Commit: Kitware Robot CommitDate: Tue Jan 3 00:01:04 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e92bafa..3a63eac 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 20170102) +set(CMake_VERSION_PATCH 20170103) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jan 4 00:01:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 4 Jan 2017 00:01:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-923-gc628fd2 Message-ID: <20170104050121.D7E2BFA562@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c628fd2fab273999e959aad00834369924dd9d06 (commit) from bd9b53ab33bb2185d526e8897cbd8f95c680b2c7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c628fd2fab273999e959aad00834369924dd9d06 commit c628fd2fab273999e959aad00834369924dd9d06 Author: Kitware Robot AuthorDate: Wed Jan 4 00:01:03 2017 -0500 Commit: Kitware Robot CommitDate: Wed Jan 4 00:01:03 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3a63eac..ff2c903 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 20170103) +set(CMake_VERSION_PATCH 20170104) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From ben.boeckel at kitware.com Wed Jan 4 08:06:01 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 4 Jan 2017 08:06:01 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1877-gd0868c9 Message-ID: <20170104130601.89C49FA680@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d0868c9866d1bec94285c51bf2c6258e1c835223 (commit) via 78c5db6a0ad90eec54958e06e7b9dcac9b6cc8ab (commit) from 040e28be7c196697a103e19725d1c9ef392d2471 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d0868c9866d1bec94285c51bf2c6258e1c835223 commit d0868c9866d1bec94285c51bf2c6258e1c835223 Merge: 040e28b 78c5db6 Author: Ben Boeckel AuthorDate: Wed Jan 4 08:05:59 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 4 08:05:59 2017 -0500 Merge topic 'codeblocks-nmake-makefiles-jom' into next 78c5db6a Allow CodeBlocks for NMake Makefiles JOM https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78c5db6a0ad90eec54958e06e7b9dcac9b6cc8ab commit 78c5db6a0ad90eec54958e06e7b9dcac9b6cc8ab Author: Konstantin Podsvirov AuthorDate: Fri Dec 23 12:50:40 2016 +0300 Commit: Konstantin Podsvirov CommitDate: Fri Dec 23 12:50:40 2016 +0300 Allow CodeBlocks for NMake Makefiles JOM diff --git a/Help/generator/CodeBlocks.rst b/Help/generator/CodeBlocks.rst index 01798c7..d03cb0c 100644 --- a/Help/generator/CodeBlocks.rst +++ b/Help/generator/CodeBlocks.rst @@ -18,6 +18,9 @@ This "extra" generator may be specified as: ``CodeBlocks - NMake Makefiles`` Generate with :generator:`NMake Makefiles`. +``CodeBlocks - NMake Makefiles JOM`` + Generate with :generator:`NMake Makefiles JOM`. + ``CodeBlocks - Ninja`` Generate with :generator:`Ninja`. diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index 4c51af4..e42ce48 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -46,6 +46,9 @@ Generators :variable:`CMAKE_CODELITE_USE_TARGETS` option to change project creation from projects to targets. +* The :generator:`CodeBlocks` now can generate with + :generator:`NMake Makefiles JOM`. + Commands -------- diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 18c732d..bc81a6a 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -49,6 +49,7 @@ cmExtraCodeBlocksGenerator::GetFactory() #if defined(_WIN32) factory.AddSupportedGlobalGenerator("MinGW Makefiles"); factory.AddSupportedGlobalGenerator("NMake Makefiles"); + factory.AddSupportedGlobalGenerator("NMake Makefiles JOM"); // disable until somebody actually tests it: // this->AddSupportedGlobalGenerator("MSYS Makefiles"); #endif @@ -743,7 +744,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand( } std::string generator = this->GlobalGenerator->GetName(); - if (generator == "NMake Makefiles") { + if (generator == "NMake Makefiles" || generator == "NMake Makefiles JOM") { // For Windows ConvertToOutputPath already adds quotes when required. // These need to be escaped, see // https://gitlab.kitware.com/cmake/cmake/issues/13952 ----------------------------------------------------------------------- Summary of changes: Help/generator/CodeBlocks.rst | 3 +++ Help/release/3.7.rst | 3 +++ Source/cmExtraCodeBlocksGenerator.cxx | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jan 5 00:01:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 5 Jan 2017 00:01:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-924-g5df77fb Message-ID: <20170105050109.30A34FA681@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5df77fba5327ce78d297587be1a29fe7688b6b42 (commit) from c628fd2fab273999e959aad00834369924dd9d06 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5df77fba5327ce78d297587be1a29fe7688b6b42 commit 5df77fba5327ce78d297587be1a29fe7688b6b42 Author: Kitware Robot AuthorDate: Thu Jan 5 00:01:05 2017 -0500 Commit: Kitware Robot CommitDate: Thu Jan 5 00:01:05 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ff2c903..4d7be8d 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 20170104) +set(CMake_VERSION_PATCH 20170105) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jan 6 00:01:16 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 6 Jan 2017 00:01:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-925-g7373505 Message-ID: <20170106050116.980CAFA46E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 737350526234269b79c52f9dc567e0f1d93b13f2 (commit) from 5df77fba5327ce78d297587be1a29fe7688b6b42 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=737350526234269b79c52f9dc567e0f1d93b13f2 commit 737350526234269b79c52f9dc567e0f1d93b13f2 Author: Kitware Robot AuthorDate: Fri Jan 6 00:01:04 2017 -0500 Commit: Kitware Robot CommitDate: Fri Jan 6 00:01:04 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4d7be8d..2ab85a8 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 20170105) +set(CMake_VERSION_PATCH 20170106) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jan 7 00:01:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 7 Jan 2017 00:01:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-926-g0d8874e Message-ID: <20170107050107.6743FFA5D7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 0d8874e49374fda8513f1f3c5fa1797aa86d90ed (commit) from 737350526234269b79c52f9dc567e0f1d93b13f2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d8874e49374fda8513f1f3c5fa1797aa86d90ed commit 0d8874e49374fda8513f1f3c5fa1797aa86d90ed Author: Kitware Robot AuthorDate: Sat Jan 7 00:01:03 2017 -0500 Commit: Kitware Robot CommitDate: Sat Jan 7 00:01:03 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2ab85a8..0a050e0 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 20170106) +set(CMake_VERSION_PATCH 20170107) #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 Jan 8 00:01:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 8 Jan 2017 00:01:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-927-g9cad0ec Message-ID: <20170108050108.986B6FA5D5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9cad0ec691f3d019a8737c4a6bb61c11573e6062 (commit) from 0d8874e49374fda8513f1f3c5fa1797aa86d90ed (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cad0ec691f3d019a8737c4a6bb61c11573e6062 commit 9cad0ec691f3d019a8737c4a6bb61c11573e6062 Author: Kitware Robot AuthorDate: Sun Jan 8 00:01:04 2017 -0500 Commit: Kitware Robot CommitDate: Sun Jan 8 00:01:04 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0a050e0..d6394db 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 20170107) +set(CMake_VERSION_PATCH 20170108) #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 Jan 9 00:01:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 9 Jan 2017 00:01:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-928-g976574b Message-ID: <20170109050107.279DCFA567@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 976574b01009e11326c7894edf35a4f315b216d4 (commit) from 9cad0ec691f3d019a8737c4a6bb61c11573e6062 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=976574b01009e11326c7894edf35a4f315b216d4 commit 976574b01009e11326c7894edf35a4f315b216d4 Author: Kitware Robot AuthorDate: Mon Jan 9 00:01:04 2017 -0500 Commit: Kitware Robot CommitDate: Mon Jan 9 00:01:04 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d6394db..6b0bfe4 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 20170108) +set(CMake_VERSION_PATCH 20170109) #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 Jan 9 15:46:50 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 15:46:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1879-g6681122 Message-ID: <20170109204650.E4C77FA2F0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6681122a8fd8d93bb49c79d8ba448fc870fd6747 (commit) via 2a9429bbd2b67c9c639492bafc645ddd1eeee7c7 (commit) from d0868c9866d1bec94285c51bf2c6258e1c835223 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6681122a8fd8d93bb49c79d8ba448fc870fd6747 commit 6681122a8fd8d93bb49c79d8ba448fc870fd6747 Merge: d0868c9 2a9429b Author: Brad King AuthorDate: Mon Jan 9 15:46:49 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 15:46:49 2017 -0500 Merge topic '16253-xcode-effective-platform-name' into next 2a9429bb Revert topic '16253-xcode-effective-platform-name' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a9429bbd2b67c9c639492bafc645ddd1eeee7c7 commit 2a9429bbd2b67c9c639492bafc645ddd1eeee7c7 Author: Brad King AuthorDate: Mon Jan 9 15:46:26 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 15:46:26 2017 -0500 Revert topic '16253-xcode-effective-platform-name' It needs some revision and test fixes. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index c2a76e4..b6db0d6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4419,9 +4419,9 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config, // The generator may add the configuration's subdirectory. if (!conf.empty()) { - bool useEPN = this->Makefile->ShouldEmitEffectivePlatformName(); + bool iosPlatform = this->Makefile->PlatformIsAppleIos(); std::string suffix = - usesDefaultOutputDir && useEPN ? "${EFFECTIVE_PLATFORM_NAME}" : ""; + usesDefaultOutputDir && iosPlatform ? "${EFFECTIVE_PLATFORM_NAME}" : ""; this->LocalGenerator->GetGlobalGenerator()->AppendDirectoryForConfig( "/", conf, suffix, out); } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index c2767f0..2808051 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2342,8 +2342,8 @@ void cmGlobalGenerator::AddGlobalTarget_Install( singleLine.push_back(cmd); if (cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') { std::string cfgArg = "-DBUILD_TYPE="; - bool useEPN = mf->ShouldEmitEffectivePlatformName(); - if (useEPN) { + bool iosPlatform = mf->PlatformIsAppleIos(); + if (iosPlatform) { cfgArg += "$(CONFIGURATION)"; singleLine.push_back(cfgArg); cfgArg = "-DEFFECTIVE_PLATFORM_NAME=$(EFFECTIVE_PLATFORM_NAME)"; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0656b0a..fccb486 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2184,22 +2184,6 @@ bool cmMakefile::PlatformIsAppleIos() const return false; } -bool cmMakefile::ShouldEmitEffectivePlatformName() const -{ - bool isXcode = this->IsOn("XCODE"); - if (!isXcode) { - return false; - } - - const char* xcodeVersion = this->GetDefinition("XCODE_VERSION"); - if (!xcodeVersion || - cmSystemTools::VersionCompareGreater("5", xcodeVersion)) { - return false; - } - - return true; -} - const char* cmMakefile::GetSONameFlag(const std::string& language) const { std::string name = "CMAKE_SHARED_LIBRARY_SONAME"; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index f929951..3484e5a 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -427,9 +427,6 @@ public: /** Return whether the target platform is Apple iOS. */ bool PlatformIsAppleIos() const; - /** Return whether the generator should use EFFECTIVE_PLATFORM_NAME. */ - bool ShouldEmitEffectivePlatformName() const; - /** Retrieve soname flag for the specified language if supported */ const char* GetSONameFlag(const std::string& language) const; diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 57766db..60912c2 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -18,27 +18,6 @@ run_cmake(PerConfigPerSourceFlags) # Use a single build tree for a few tests without cleaning. if(NOT XCODE_VERSION VERSION_LESS 5) - set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeMultiplatform-build) - set(RunCMake_TEST_NO_CLEAN 1) - set(RunCMake_TEST_OPTIONS) - - file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") - file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - - run_cmake(XcodeMultiplatform) - - run_cmake_command(XcodeMultiplatform-macosx-build ${CMAKE_COMMAND} --build . -- -sdk macosx) - run_cmake_command(XcodeMultiplatform-iphonesimulator-build ${CMAKE_COMMAND} --build . -- -sdk iphonesimulator) - - run_cmake_command(XcodeMultiplatform-macosx-install ${CMAKE_COMMAND} --build . --target install -- -sdk macosx DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_macosx) - run_cmake_command(XcodeMultiplatform-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- -sdk iphonesimulator DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator) - - unset(RunCMake_TEST_BINARY_DIR) - unset(RunCMake_TEST_NO_CLEAN) - unset(RunCMake_TEST_OPTIONS) -endif() - -if(NOT XCODE_VERSION VERSION_LESS 5) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeInstallIOS-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install") diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake deleted file mode 100644 index 166ce85..0000000 --- a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 3.3) -enable_language(CXX) - -set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx iphonesimulator") -set(CMAKE_MACOSX_BUNDLE true) - -add_library(library STATIC foo.cpp) - -add_executable(main main.cpp) -target_link_libraries(main library) - -install(TARGETS library ARCHIVE DESTINATION lib) ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 4 ++-- Source/cmGlobalGenerator.cxx | 4 ++-- Source/cmMakefile.cxx | 16 --------------- Source/cmMakefile.h | 3 --- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 21 -------------------- .../RunCMake/XcodeProject/XcodeMultiplatform.cmake | 12 ----------- 6 files changed, 4 insertions(+), 56 deletions(-) delete mode 100644 Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 15:55:03 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 15:55:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1881-gd497b25 Message-ID: <20170109205503.27308FA567@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d497b25dcc2d84a7222b32182586ecc4995221ec (commit) via cda9a904b5ef76d923a072a45c0c15fd1d87d6be (commit) from 6681122a8fd8d93bb49c79d8ba448fc870fd6747 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d497b25dcc2d84a7222b32182586ecc4995221ec commit d497b25dcc2d84a7222b32182586ecc4995221ec Merge: 6681122 cda9a90 Author: Brad King AuthorDate: Mon Jan 9 15:55:02 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 15:55:02 2017 -0500 Merge topic 'sparc-libatomic' into next cda9a904 Explicitly link against libatomic on Linux/sparc for `__atomic_fetch_add_4` https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cda9a904b5ef76d923a072a45c0c15fd1d87d6be commit cda9a904b5ef76d923a072a45c0c15fd1d87d6be Author: Rolf Eike Beer AuthorDate: Mon Dec 19 14:47:01 2016 +0100 Commit: Brad King CommitDate: Mon Jan 9 15:51:35 2017 -0500 Explicitly link against libatomic on Linux/sparc for `__atomic_fetch_add_4` On this platform atomic instructions are implemented using `libatomic` so we need to link it to use them. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index d15fdbe..388bf89 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -785,6 +785,15 @@ target_link_libraries(CMakeLib cmsys ${CMake_KWIML_LIBRARIES} ) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") + # the atomic instructions are implemented using libatomic on some platforms, + # so linking to that may be required + check_library_exists(atomic __atomic_fetch_add_4 "" LIBATOMIC_NEEDED) + if(LIBATOMIC_NEEDED) + target_link_libraries(CMakeLib atomic) + endif() +endif() + # On Apple we need CoreFoundation if(APPLE) target_link_libraries(CMakeLib "-framework CoreFoundation") ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:01:56 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:01:56 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1883-g07d6480 Message-ID: <20170109210156.381F6FA5B9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 07d64808b353bb14faa959596f0489a17f5f85f6 (commit) via 567a4fe9b1984d5c770afab8bd677bcee3841659 (commit) from d497b25dcc2d84a7222b32182586ecc4995221ec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07d64808b353bb14faa959596f0489a17f5f85f6 commit 07d64808b353bb14faa959596f0489a17f5f85f6 Merge: d497b25 567a4fe Author: Brad King AuthorDate: Mon Jan 9 16:01:55 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:01:55 2017 -0500 Merge topic 'read-only-type-target-property' into next 567a4fe9 Revert "cmTarget: Enforce TYPE being a read-only property" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=567a4fe9b1984d5c770afab8bd677bcee3841659 commit 567a4fe9b1984d5c770afab8bd677bcee3841659 Author: Brad King AuthorDate: Mon Jan 9 16:01:40 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 16:01:40 2017 -0500 Revert "cmTarget: Enforce TYPE being a read-only property" This reverts commit fd466d3fd3070b36aadbd7457ddb644b33d40a61. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9261ca8..ee4ff39 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -858,12 +858,6 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } - if (prop == "TYPE") { - std::ostringstream e; - e << "TYPE property is read-only\n"; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return; - } if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake index 1ddacee..37c7124 100644 --- a/Tests/RunCMake/set_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake @@ -6,5 +6,4 @@ run_cmake(COMPILE_OPTIONS) run_cmake(INCLUDE_DIRECTORIES) run_cmake(LINK_LIBRARIES) run_cmake(SOURCES) -run_cmake(TYPE) run_cmake(USER_PROP) diff --git a/Tests/RunCMake/set_property/TYPE-result.txt b/Tests/RunCMake/set_property/TYPE-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/set_property/TYPE-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/set_property/TYPE-stderr.txt b/Tests/RunCMake/set_property/TYPE-stderr.txt deleted file mode 100644 index 6226051..0000000 --- a/Tests/RunCMake/set_property/TYPE-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -TYPE property is read-only \ No newline at end of file diff --git a/Tests/RunCMake/set_property/TYPE.cmake b/Tests/RunCMake/set_property/TYPE.cmake deleted file mode 100644 index 8481266..0000000 --- a/Tests/RunCMake/set_property/TYPE.cmake +++ /dev/null @@ -1,2 +0,0 @@ -add_custom_target(CustomTarget) -set_property(TARGET CustomTarget PROPERTY TYPE foo) ----------------------------------------------------------------------- Summary of changes: Source/cmTarget.cxx | 6 ------ Tests/RunCMake/set_property/RunCMakeTest.cmake | 1 - Tests/RunCMake/set_property/TYPE-result.txt | 1 - Tests/RunCMake/set_property/TYPE-stderr.txt | 1 - Tests/RunCMake/set_property/TYPE.cmake | 2 -- 5 files changed, 11 deletions(-) delete mode 100644 Tests/RunCMake/set_property/TYPE-result.txt delete mode 100644 Tests/RunCMake/set_property/TYPE-stderr.txt delete mode 100644 Tests/RunCMake/set_property/TYPE.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:02:08 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:02:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1885-g8be34d3 Message-ID: <20170109210208.9F95CFA5B9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8be34d3d4c4669793f8a400dfa111230d92af701 (commit) via 98f2143305b8b8c5ce08dfa38ee79750696865a6 (commit) from 07d64808b353bb14faa959596f0489a17f5f85f6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8be34d3d4c4669793f8a400dfa111230d92af701 commit 8be34d3d4c4669793f8a400dfa111230d92af701 Merge: 07d6480 98f2143 Author: Brad King AuthorDate: Mon Jan 9 16:02:07 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:02:07 2017 -0500 Merge topic 'read-only-type-target-property' into next 98f21433 cmTarget: Enforce TYPE being a read-only property https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98f2143305b8b8c5ce08dfa38ee79750696865a6 commit 98f2143305b8b8c5ce08dfa38ee79750696865a6 Author: Gregor Jasny AuthorDate: Thu Dec 29 23:11:50 2016 +0100 Commit: Brad King CommitDate: Mon Jan 9 16:00:39 2017 -0500 cmTarget: Enforce TYPE being a read-only property diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ee4ff39..9261ca8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -858,6 +858,12 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } + if (prop == "TYPE") { + std::ostringstream e; + e << "TYPE property is read-only\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake index 37c7124..1ddacee 100644 --- a/Tests/RunCMake/set_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake @@ -6,4 +6,5 @@ run_cmake(COMPILE_OPTIONS) run_cmake(INCLUDE_DIRECTORIES) run_cmake(LINK_LIBRARIES) run_cmake(SOURCES) +run_cmake(TYPE) run_cmake(USER_PROP) diff --git a/Tests/RunCMake/set_property/TYPE-result.txt b/Tests/RunCMake/set_property/TYPE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/set_property/TYPE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/set_property/TYPE-stderr.txt b/Tests/RunCMake/set_property/TYPE-stderr.txt new file mode 100644 index 0000000..fbc8653 --- /dev/null +++ b/Tests/RunCMake/set_property/TYPE-stderr.txt @@ -0,0 +1 @@ +TYPE property is read-only diff --git a/Tests/RunCMake/set_property/TYPE.cmake b/Tests/RunCMake/set_property/TYPE.cmake new file mode 100644 index 0000000..8481266 --- /dev/null +++ b/Tests/RunCMake/set_property/TYPE.cmake @@ -0,0 +1,2 @@ +add_custom_target(CustomTarget) +set_property(TARGET CustomTarget PROPERTY TYPE foo) ----------------------------------------------------------------------- Summary of changes: Source/cmTarget.cxx | 6 ++++++ Tests/RunCMake/set_property/RunCMakeTest.cmake | 1 + .../BadSYSROOT-result.txt => set_property/TYPE-result.txt} | 0 Tests/RunCMake/set_property/TYPE-stderr.txt | 1 + Tests/RunCMake/set_property/TYPE.cmake | 2 ++ 5 files changed, 10 insertions(+) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => set_property/TYPE-result.txt} (100%) create mode 100644 Tests/RunCMake/set_property/TYPE-stderr.txt create mode 100644 Tests/RunCMake/set_property/TYPE.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:06:30 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:06:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1887-g73677b9 Message-ID: <20170109210631.5CB79FA5F3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 73677b9fab31d1f68cf0d5dfe2bb68f4b9887d81 (commit) via cfbc407faab422db01e4a7d2c4e5a7c3acdc9951 (commit) from 8be34d3d4c4669793f8a400dfa111230d92af701 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73677b9fab31d1f68cf0d5dfe2bb68f4b9887d81 commit 73677b9fab31d1f68cf0d5dfe2bb68f4b9887d81 Merge: 8be34d3 cfbc407 Author: Brad King AuthorDate: Mon Jan 9 16:06:29 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:06:29 2017 -0500 Merge topic 'gcc-34-features' into next cfbc407f Revert topic 'gcc-34-features' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfbc407faab422db01e4a7d2c4e5a7c3acdc9951 commit cfbc407faab422db01e4a7d2c4e5a7c3acdc9951 Author: Brad King AuthorDate: Mon Jan 9 16:06:14 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 16:06:14 2017 -0500 Revert topic 'gcc-34-features' It will be revised and restored with an alternative approach. diff --git a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt index 7da526a..9b35f27 100644 --- a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt +++ b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt @@ -32,14 +32,14 @@ if (CMAKE_CXX_COMPILE_FEATURES) endif() add_executable(target_compile_features${target_suffix} main.cpp) target_compile_features(target_compile_features${target_suffix} - PRIVATE cxx_long_long_type + PRIVATE cxx_auto_type ) - add_library(lib_long_long_type lib_long_long_type.cpp) - target_compile_features(lib_long_long_type - PUBLIC cxx_long_long_type + add_library(lib_auto_type lib_auto_type.cpp) + target_compile_features(lib_auto_type + PUBLIC cxx_auto_type ) add_executable(lib_user lib_user.cpp) - target_link_libraries(lib_user lib_long_long_type) + target_link_libraries(lib_user lib_auto_type) endif() diff --git a/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp b/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp new file mode 100644 index 0000000..71b2215 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp @@ -0,0 +1,6 @@ + +int getAutoTypeImpl() +{ + auto i = 0; + return i; +} diff --git a/Tests/CMakeCommands/target_compile_features/lib_auto_type.h b/Tests/CMakeCommands/target_compile_features/lib_auto_type.h new file mode 100644 index 0000000..c825b10 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_auto_type.h @@ -0,0 +1,8 @@ + +int getAutoTypeImpl(); + +int getAutoType() +{ + auto i = getAutoTypeImpl(); + return i; +} diff --git a/Tests/CMakeCommands/target_compile_features/lib_long_long_type.cpp b/Tests/CMakeCommands/target_compile_features/lib_long_long_type.cpp deleted file mode 100644 index 4d3a896..0000000 --- a/Tests/CMakeCommands/target_compile_features/lib_long_long_type.cpp +++ /dev/null @@ -1,11 +0,0 @@ - -int getLLTypeImpl(long long &l) -{ - int i = 64; - while(l) { - if(l & 1) - i--; - l >>= 1; - } - return i; -} diff --git a/Tests/CMakeCommands/target_compile_features/lib_long_long_type.h b/Tests/CMakeCommands/target_compile_features/lib_long_long_type.h deleted file mode 100644 index 8111382..0000000 --- a/Tests/CMakeCommands/target_compile_features/lib_long_long_type.h +++ /dev/null @@ -1,8 +0,0 @@ - -int getLLTypeImpl(long long &); - -int getLLType(int i) -{ - long long l = i; - return getLLTypeImpl(l); -} diff --git a/Tests/CMakeCommands/target_compile_features/lib_user.cpp b/Tests/CMakeCommands/target_compile_features/lib_user.cpp index 8e6f860..541e528 100644 --- a/Tests/CMakeCommands/target_compile_features/lib_user.cpp +++ b/Tests/CMakeCommands/target_compile_features/lib_user.cpp @@ -1,7 +1,7 @@ -#include "lib_long_long_type.h" +#include "lib_auto_type.h" int main(int argc, char** argv) { - return getLLType(42); + return getAutoType(); } diff --git a/Tests/CMakeCommands/target_compile_features/main.cpp b/Tests/CMakeCommands/target_compile_features/main.cpp index aee232a..6f5daee 100644 --- a/Tests/CMakeCommands/target_compile_features/main.cpp +++ b/Tests/CMakeCommands/target_compile_features/main.cpp @@ -1,6 +1,6 @@ int main(int, char**) { - long long i = 1 << 31; - return (i << 1) == 0; + auto i = 0; + return i; } diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 7c5aa88..0405def 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -278,7 +278,7 @@ if (CMAKE_CXX_COMPILE_FEATURES) add_executable(CompileFeatures main.cpp) set_property(TARGET CompileFeatures - PROPERTY COMPILE_FEATURES "cxx_long_long_type" + PROPERTY COMPILE_FEATURES "cxx_auto_type" ) set_property(TARGET CompileFeatures PROPERTY CXX_STANDARD_REQUIRED TRUE @@ -291,7 +291,7 @@ if (CMAKE_CXX_COMPILE_FEATURES) add_library(iface INTERFACE) set_property(TARGET iface - PROPERTY INTERFACE_COMPILE_FEATURES "cxx_long_long_type" + PROPERTY INTERFACE_COMPILE_FEATURES "cxx_auto_type" ) add_executable(IfaceCompileFeatures main.cpp) target_link_libraries(IfaceCompileFeatures iface) diff --git a/Tests/CompileFeatures/main.cpp b/Tests/CompileFeatures/main.cpp index 5472cab..c5a7a46 100644 --- a/Tests/CompileFeatures/main.cpp +++ b/Tests/CompileFeatures/main.cpp @@ -1,6 +1,6 @@ int main(int, char**) { - long long value = 1 << 31; - return (value << 1) == 0; + auto value = 0; + return value; } ----------------------------------------------------------------------- Summary of changes: Tests/CMakeCommands/target_compile_features/CMakeLists.txt | 10 +++++----- .../CMakeCommands/target_compile_features/lib_auto_type.cpp | 6 ++++++ Tests/CMakeCommands/target_compile_features/lib_auto_type.h | 8 ++++++++ .../target_compile_features/lib_long_long_type.cpp | 11 ----------- .../target_compile_features/lib_long_long_type.h | 8 -------- Tests/CMakeCommands/target_compile_features/lib_user.cpp | 4 ++-- Tests/CMakeCommands/target_compile_features/main.cpp | 4 ++-- Tests/CompileFeatures/CMakeLists.txt | 4 ++-- Tests/CompileFeatures/main.cpp | 4 ++-- 9 files changed, 27 insertions(+), 32 deletions(-) create mode 100644 Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp create mode 100644 Tests/CMakeCommands/target_compile_features/lib_auto_type.h delete mode 100644 Tests/CMakeCommands/target_compile_features/lib_long_long_type.cpp delete mode 100644 Tests/CMakeCommands/target_compile_features/lib_long_long_type.h hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:11:59 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:11:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1899-gc354e66 Message-ID: <20170109211159.9B237F7866@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via c354e6695678ce81925ff73327bdfb4f7b5f9b7b (commit) via 976574b01009e11326c7894edf35a4f315b216d4 (commit) via 9cad0ec691f3d019a8737c4a6bb61c11573e6062 (commit) via 0d8874e49374fda8513f1f3c5fa1797aa86d90ed (commit) via 737350526234269b79c52f9dc567e0f1d93b13f2 (commit) via 5df77fba5327ce78d297587be1a29fe7688b6b42 (commit) via c628fd2fab273999e959aad00834369924dd9d06 (commit) via bd9b53ab33bb2185d526e8897cbd8f95c680b2c7 (commit) via c8084b3020b51150ecb5b1dc3b91758b171c93f4 (commit) via ea0db79e65fb943381c8a3358fd18ba2516e29bd (commit) via fbf0f0b3b6a2a6c7cfd8bc7eca2cfbd0263670f9 (commit) via da04b68f3937ae2d4497068b41e7cd69d449320a (commit) from 73677b9fab31d1f68cf0d5dfe2bb68f4b9887d81 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c354e6695678ce81925ff73327bdfb4f7b5f9b7b commit c354e6695678ce81925ff73327bdfb4f7b5f9b7b Merge: 73677b9 976574b Author: Brad King AuthorDate: Mon Jan 9 16:11:50 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 16:11:50 2017 -0500 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 Jan 9 16:17:10 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:17:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1901-g12663fc Message-ID: <20170109211710.C2396F9AF6@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 12663fc8718aa156afdf43697193747b35348988 (commit) via 2f4e5ed66dc34a5f4ecb80d38d291d1e78ac12f7 (commit) from c354e6695678ce81925ff73327bdfb4f7b5f9b7b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12663fc8718aa156afdf43697193747b35348988 commit 12663fc8718aa156afdf43697193747b35348988 Merge: c354e66 2f4e5ed Author: Brad King AuthorDate: Mon Jan 9 16:17:10 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:17:10 2017 -0500 Merge topic 'cpack-deb-package-version-override-fix' into next 2f4e5ed6 CPackDeb: use CPACK_DEBIAN_PACKAGE_VERSION https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f4e5ed66dc34a5f4ecb80d38d291d1e78ac12f7 commit 2f4e5ed66dc34a5f4ecb80d38d291d1e78ac12f7 Author: Daniel Pfeifer AuthorDate: Tue Dec 20 14:09:20 2016 +0100 Commit: Daniel Pfeifer CommitDate: Tue Dec 20 14:09:20 2016 +0100 CPackDeb: use CPACK_DEBIAN_PACKAGE_VERSION diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index bee69d9..ddf8b23 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -914,7 +914,7 @@ function(cpack_deb_prepare_package_vars) extract_so_info("${_FILE}" libname soversion) if(libname AND soversion) list(APPEND CPACK_DEBIAN_PACKAGE_SHLIBS_LIST - "${libname} ${soversion} ${CPACK_DEBIAN_PACKAGE_NAME} (${CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY} ${CPACK_PACKAGE_VERSION})") + "${libname} ${soversion} ${CPACK_DEBIAN_PACKAGE_NAME} (${CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY} ${CPACK_DEBIAN_PACKAGE_VERSION})") else() message(AUTHOR_WARNING "Shared library '${_FILE}' is missing soname or soversion. Library will not be added to DEBIAN/shlibs control file.") endif() @@ -967,7 +967,7 @@ function(cpack_deb_prepare_package_vars) # Patch package file name to be in corrent debian format: # _-_.deb set(CPACK_OUTPUT_FILE_NAME - "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") + "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") else() cmake_policy(PUSH) cmake_policy(SET CMP0010 NEW) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:18 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-930-g8f9e088 Message-ID: <20170109212718.97681F9FE7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8f9e0884d4f948526c08c35dde345a142352d549 (commit) via 4087d0ae85cd9835296a82e0d5a63db0feabcb93 (commit) from 976574b01009e11326c7894edf35a4f315b216d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f9e0884d4f948526c08c35dde345a142352d549 commit 8f9e0884d4f948526c08c35dde345a142352d549 Merge: 976574b 4087d0a Author: Brad King AuthorDate: Mon Jan 9 16:27:16 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:27:16 2017 -0500 Merge topic 'pgi-ninja-fortran' 4087d0ae PGI: Add support for Fortran with the Ninja generator ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/PGI-Fortran.cmake | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:21 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:21 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-932-ga0ed39a Message-ID: <20170109212721.CA4C1F9AEE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a0ed39ac2207edbda08b1459096d2c1bf757cc71 (commit) via 7789dd9a1ae79d6747883739a21cf90c139d1e54 (commit) from 8f9e0884d4f948526c08c35dde345a142352d549 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0ed39ac2207edbda08b1459096d2c1bf757cc71 commit a0ed39ac2207edbda08b1459096d2c1bf757cc71 Merge: 8f9e088 7789dd9 Author: Brad King AuthorDate: Mon Jan 9 16:27:19 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:27:19 2017 -0500 Merge topic 'mr-reset-error-flag-on-configure' 7789dd9a server-mode: Call ResetErrorOccured before configure ----------------------------------------------------------------------- Summary of changes: Source/cmServerProtocol.cxx | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:24 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-934-g0dabeb6 Message-ID: <20170109212724.D8473FA031@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 0dabeb6024b352bc7d5f9e1dce63ad87186ce36f (commit) via 8e4d286e7b105407d523ccf745198d0400b5fdb3 (commit) from a0ed39ac2207edbda08b1459096d2c1bf757cc71 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0dabeb6024b352bc7d5f9e1dce63ad87186ce36f commit 0dabeb6024b352bc7d5f9e1dce63ad87186ce36f Merge: a0ed39a 8e4d286 Author: Brad King AuthorDate: Mon Jan 9 16:27:22 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:27:22 2017 -0500 Merge topic 'fix-required-var-error-typo' 8e4d286e Fix typo in error message on missing required variable ----------------------------------------------------------------------- Summary of changes: Source/cmMakefile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:27 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-936-gcda3a69 Message-ID: <20170109212727.E5B0EFA00C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via cda3a69b1bcc2e83806f7423c6970a794be8261f (commit) via 98f2143305b8b8c5ce08dfa38ee79750696865a6 (commit) from 0dabeb6024b352bc7d5f9e1dce63ad87186ce36f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cda3a69b1bcc2e83806f7423c6970a794be8261f commit cda3a69b1bcc2e83806f7423c6970a794be8261f Merge: 0dabeb6 98f2143 Author: Brad King AuthorDate: Mon Jan 9 16:27:25 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:27:25 2017 -0500 Merge topic 'read-only-type-target-property' 98f21433 cmTarget: Enforce TYPE being a read-only property ----------------------------------------------------------------------- Summary of changes: Source/cmTarget.cxx | 6 ++++++ Tests/RunCMake/set_property/RunCMakeTest.cmake | 1 + .../BadSYSROOT-result.txt => set_property/TYPE-result.txt} | 0 Tests/RunCMake/set_property/TYPE-stderr.txt | 1 + Tests/RunCMake/set_property/TYPE.cmake | 2 ++ 5 files changed, 10 insertions(+) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => set_property/TYPE-result.txt} (100%) create mode 100644 Tests/RunCMake/set_property/TYPE-stderr.txt create mode 100644 Tests/RunCMake/set_property/TYPE.cmake hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:30 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-938-g4ce6cd2 Message-ID: <20170109212730.AD86EFA0A9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4ce6cd2bcfa847fe2e9926d97f27be1d89fe1c4b (commit) via 88f07fb417a25f98662da2abf09a9db03f48eb7f (commit) from cda3a69b1bcc2e83806f7423c6970a794be8261f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce6cd2bcfa847fe2e9926d97f27be1d89fe1c4b commit 4ce6cd2bcfa847fe2e9926d97f27be1d89fe1c4b Merge: cda3a69 88f07fb Author: Brad King AuthorDate: Mon Jan 9 16:27:28 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:27:28 2017 -0500 Merge topic '15687-revisit-xcode-system-include' 88f07fb4 Xcode: Properly mark SYSTEM includes as such ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalXCodeGenerator.cxx | 16 ++++++++++++++++ Tests/IncludeDirectories/CMakeLists.txt | 4 +++- .../SystemIncludeDirectories/CMakeLists.txt | 15 +++++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:33 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-940-geee51e2 Message-ID: <20170109212733.7F3F8FA0AC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via eee51e24d2290771ad3dded566ef897243f21331 (commit) via 2f4e5ed66dc34a5f4ecb80d38d291d1e78ac12f7 (commit) from 4ce6cd2bcfa847fe2e9926d97f27be1d89fe1c4b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eee51e24d2290771ad3dded566ef897243f21331 commit eee51e24d2290771ad3dded566ef897243f21331 Merge: 4ce6cd2 2f4e5ed Author: Brad King AuthorDate: Mon Jan 9 16:27:31 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:27:31 2017 -0500 Merge topic 'cpack-deb-package-version-override-fix' 2f4e5ed6 CPackDeb: use CPACK_DEBIAN_PACKAGE_VERSION ----------------------------------------------------------------------- Summary of changes: Modules/CPackDeb.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:27:54 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:27:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1908-g0e1c33d Message-ID: <20170109212754.19D78FA0A9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 0e1c33dcb83294825f0f1785895684721f99875b (commit) via eee51e24d2290771ad3dded566ef897243f21331 (commit) via 4ce6cd2bcfa847fe2e9926d97f27be1d89fe1c4b (commit) via cda3a69b1bcc2e83806f7423c6970a794be8261f (commit) via 0dabeb6024b352bc7d5f9e1dce63ad87186ce36f (commit) via a0ed39ac2207edbda08b1459096d2c1bf757cc71 (commit) via 8f9e0884d4f948526c08c35dde345a142352d549 (commit) from 12663fc8718aa156afdf43697193747b35348988 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e1c33dcb83294825f0f1785895684721f99875b commit 0e1c33dcb83294825f0f1785895684721f99875b Merge: 12663fc eee51e2 Author: Brad King AuthorDate: Mon Jan 9 16:27:42 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 16:27:42 2017 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:33:19 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:33:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1910-ga2773b1 Message-ID: <20170109213319.ED492FA2A7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a2773b1709e7c853512981039144ed53e3ef802f (commit) via 33e628ee809cd1d7ec2a8a0290ac0351fa4d499b (commit) from 0e1c33dcb83294825f0f1785895684721f99875b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2773b1709e7c853512981039144ed53e3ef802f commit a2773b1709e7c853512981039144ed53e3ef802f Merge: 0e1c33d 33e628e Author: Brad King AuthorDate: Mon Jan 9 16:33:19 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:33:19 2017 -0500 Merge topic 'cmake-server-do-not-crash-on-interface-lib' into next 33e628ee server-mode: Do not crash when running into INTERFACE_LIBRARY https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33e628ee809cd1d7ec2a8a0290ac0351fa4d499b commit 33e628ee809cd1d7ec2a8a0290ac0351fa4d499b Author: Tobias Hunger AuthorDate: Fri Jan 6 15:18:52 2017 +0100 Commit: Brad King CommitDate: Mon Jan 9 16:31:11 2017 -0500 server-mode: Do not crash when running into INTERFACE_LIBRARY Closes: #16539 diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index e159c8f..c3bffd6 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -720,12 +720,16 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, Json::Value result = Json::objectValue; result[kNAME_KEY] = target->GetName(); - result[kTYPE_KEY] = typeName; - result[kFULL_NAME_KEY] = target->GetFullName(config); result[kSOURCE_DIRECTORY_KEY] = lg->GetCurrentSourceDirectory(); result[kBUILD_DIRECTORY_KEY] = lg->GetCurrentBinaryDirectory(); + if (type == cmState::INTERFACE_LIBRARY) { + return result; + } + + result[kFULL_NAME_KEY] = target->GetFullName(config); + if (target->HaveWellDefinedOutputFiles()) { Json::Value artifacts = Json::arrayValue; artifacts.append(target->GetFullPath(config, false)); ----------------------------------------------------------------------- Summary of changes: Source/cmServerProtocol.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:41:54 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:41:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1913-g73b4584 Message-ID: <20170109214154.4555DF50B4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 73b458473d4bf8001037b9605543b03099d0c481 (commit) via 0471d13ecd2ff4d4a0e824a1b1d0d850ea070d05 (commit) via c0bd1eb6d0da40d429120e925aa755a1f5a754e8 (commit) from a2773b1709e7c853512981039144ed53e3ef802f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73b458473d4bf8001037b9605543b03099d0c481 commit 73b458473d4bf8001037b9605543b03099d0c481 Merge: a2773b1 0471d13 Author: Brad King AuthorDate: Mon Jan 9 16:41:53 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:41:53 2017 -0500 Merge topic 'cmake-server-do-not-crash-on-interface-lib-for-master' into next 0471d13e Merge branch 'cmake-server-do-not-crash-on-interface-lib' into cmake-server-do-not-crash-on-interface-lib-for-master c0bd1eb6 server-mode: Do not crash when running into INTERFACE_LIBRARY https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0471d13ecd2ff4d4a0e824a1b1d0d850ea070d05 commit 0471d13ecd2ff4d4a0e824a1b1d0d850ea070d05 Merge: c0bd1eb 33e628e Author: Brad King AuthorDate: Mon Jan 9 16:41:32 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 16:41:32 2017 -0500 Merge branch 'cmake-server-do-not-crash-on-interface-lib' into cmake-server-do-not-crash-on-interface-lib-for-master https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0bd1eb6d0da40d429120e925aa755a1f5a754e8 commit c0bd1eb6d0da40d429120e925aa755a1f5a754e8 Author: Tobias Hunger AuthorDate: Fri Jan 6 15:18:52 2017 +0100 Commit: Brad King CommitDate: Mon Jan 9 16:40:46 2017 -0500 server-mode: Do not crash when running into INTERFACE_LIBRARY Closes: #16539 diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index a86236c..334a05a 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -731,12 +731,16 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, Json::Value result = Json::objectValue; result[kNAME_KEY] = target->GetName(); - result[kTYPE_KEY] = typeName; - result[kFULL_NAME_KEY] = target->GetFullName(config); result[kSOURCE_DIRECTORY_KEY] = lg->GetCurrentSourceDirectory(); result[kBUILD_DIRECTORY_KEY] = lg->GetCurrentBinaryDirectory(); + if (type == cmStateEnums::INTERFACE_LIBRARY) { + return result; + } + + result[kFULL_NAME_KEY] = target->GetFullName(config); + if (target->HaveWellDefinedOutputFiles()) { Json::Value artifacts = Json::arrayValue; artifacts.append(target->GetFullPath(config, false)); ----------------------------------------------------------------------- Summary of changes: Source/cmServerProtocol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Jan 9 16:46:31 2017 From: brad.king at kitware.com (Brad King) Date: Mon, 9 Jan 2017 16:46:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1915-g2d08b22 Message-ID: <20170109214631.9C590FA279@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2d08b225f78c13781887dc26ff3a3ce621394262 (commit) via c6c976f2c2a3e6503fff3bc77c9f7b8c61cd7e0b (commit) from 73b458473d4bf8001037b9605543b03099d0c481 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d08b225f78c13781887dc26ff3a3ce621394262 commit 2d08b225f78c13781887dc26ff3a3ce621394262 Merge: 73b4584 c6c976f Author: Brad King AuthorDate: Mon Jan 9 16:46:30 2017 -0500 Commit: CMake Topic Stage CommitDate: Mon Jan 9 16:46:30 2017 -0500 Merge topic 'codeblocks-nmake-makefiles-jom' into next c6c976f2 Revert "Allow CodeBlocks for NMake Makefiles JOM" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6c976f2c2a3e6503fff3bc77c9f7b8c61cd7e0b commit c6c976f2c2a3e6503fff3bc77c9f7b8c61cd7e0b Author: Brad King AuthorDate: Mon Jan 9 16:46:22 2017 -0500 Commit: Brad King CommitDate: Mon Jan 9 16:46:22 2017 -0500 Revert "Allow CodeBlocks for NMake Makefiles JOM" This reverts commit 78c5db6a0ad90eec54958e06e7b9dcac9b6cc8ab. diff --git a/Help/generator/CodeBlocks.rst b/Help/generator/CodeBlocks.rst index d03cb0c..01798c7 100644 --- a/Help/generator/CodeBlocks.rst +++ b/Help/generator/CodeBlocks.rst @@ -18,9 +18,6 @@ This "extra" generator may be specified as: ``CodeBlocks - NMake Makefiles`` Generate with :generator:`NMake Makefiles`. -``CodeBlocks - NMake Makefiles JOM`` - Generate with :generator:`NMake Makefiles JOM`. - ``CodeBlocks - Ninja`` Generate with :generator:`Ninja`. diff --git a/Help/release/3.7.rst b/Help/release/3.7.rst index e42ce48..4c51af4 100644 --- a/Help/release/3.7.rst +++ b/Help/release/3.7.rst @@ -46,9 +46,6 @@ Generators :variable:`CMAKE_CODELITE_USE_TARGETS` option to change project creation from projects to targets. -* The :generator:`CodeBlocks` now can generate with - :generator:`NMake Makefiles JOM`. - Commands -------- diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index bc81a6a..18c732d 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -49,7 +49,6 @@ cmExtraCodeBlocksGenerator::GetFactory() #if defined(_WIN32) factory.AddSupportedGlobalGenerator("MinGW Makefiles"); factory.AddSupportedGlobalGenerator("NMake Makefiles"); - factory.AddSupportedGlobalGenerator("NMake Makefiles JOM"); // disable until somebody actually tests it: // this->AddSupportedGlobalGenerator("MSYS Makefiles"); #endif @@ -744,7 +743,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand( } std::string generator = this->GlobalGenerator->GetName(); - if (generator == "NMake Makefiles" || generator == "NMake Makefiles JOM") { + if (generator == "NMake Makefiles") { // For Windows ConvertToOutputPath already adds quotes when required. // These need to be escaped, see // https://gitlab.kitware.com/cmake/cmake/issues/13952 ----------------------------------------------------------------------- Summary of changes: Help/generator/CodeBlocks.rst | 3 --- Help/release/3.7.rst | 3 --- Source/cmExtraCodeBlocksGenerator.cxx | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jan 10 00:01:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 10 Jan 2017 00:01:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-941-gaff368b Message-ID: <20170110050108.375C5FA356@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via aff368bb8456694e2550e2f69451456728ab31eb (commit) from eee51e24d2290771ad3dded566ef897243f21331 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aff368bb8456694e2550e2f69451456728ab31eb commit aff368bb8456694e2550e2f69451456728ab31eb Author: Kitware Robot AuthorDate: Tue Jan 10 00:01:04 2017 -0500 Commit: Kitware Robot CommitDate: Tue Jan 10 00:01:04 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6b0bfe4..7a2482a 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 20170109) +set(CMake_VERSION_PATCH 20170110) #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 Tue Jan 10 02:25:23 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 10 Jan 2017 02:25:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1919-g18e54de Message-ID: <20170110072524.AC86FFA498@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 18e54de628127ac7dd948f473db3977c350c4bca (commit) via 699ce812f43553bb6b6732141d62e77716ad8726 (commit) via 4ce8a4d0a18702cf228beaa6a9ecc7b38e355751 (commit) via e0bfd3f4f565ea936f665a461380079573521916 (commit) from 2d08b225f78c13781887dc26ff3a3ce621394262 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18e54de628127ac7dd948f473db3977c350c4bca commit 18e54de628127ac7dd948f473db3977c350c4bca Merge: 2d08b22 699ce81 Author: Domen Vrankar AuthorDate: Tue Jan 10 02:25:10 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 02:25:10 2017 -0500 Merge topic 'cpack-rpm-user-bin-spec-file-fix' into next 699ce812 CPack/RPM test - custom binary spec file handling 4ce8a4d0 CPack test additional std out/err regex file overloads e0bfd3f4 CPack/RPM fix - custom binary spec file handling https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=699ce812f43553bb6b6732141d62e77716ad8726 commit 699ce812f43553bb6b6732141d62e77716ad8726 Author: Domen Vrankar AuthorDate: Mon Jan 9 21:08:47 2017 +0100 Commit: Domen Vrankar CommitDate: Mon Jan 9 21:10:16 2017 +0100 CPack/RPM test - custom binary spec file handling diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 3077340..d550ec7 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -4,6 +4,7 @@ include(RunCMake) include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") # run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP "PACKAGING_TYPES" +run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT") run_cpack_test(CUSTOM_NAMES "RPM;DEB" true "COMPONENT") run_cpack_test(DEBUGINFO "RPM" true "COMPONENT") run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT") diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake new file mode 100644 index 0000000..694dc00 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake @@ -0,0 +1,9 @@ +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") + +if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1_COMPONENT "test") + set(EXPECTED_FILE_2_COMPONENT "test2") + set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") +endif() diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt new file mode 100644 index 0000000..e6d86d0 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt @@ -0,0 +1,2 @@ +^CPackRPM: Will use USER specified spec file: (/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in +CPackRPM: Will use GENERATED spec file:.*/Tests/RunCMake/RPM/CPack/CUSTOM_BINARY_SPEC_FILE-build/_CPack_Packages/.*/RPM/SPECS/custom_binary_spec_file-test2\.spec$ diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt new file mode 100644 index 0000000..d7bb7af --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt @@ -0,0 +1 @@ +CPackRPM: Will use USER specified spec file: (/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in new file mode 100644 index 0000000..db0ac6f --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in @@ -0,0 +1,80 @@ +# -*- rpm-spec -*- +BuildRoot: %_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@ +Summary: @CPACK_RPM_PACKAGE_SUMMARY@ +Name: @CPACK_RPM_PACKAGE_NAME@ +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@ + + at TMP_RPM_URL@ + at TMP_RPM_REQUIRES@ + at TMP_RPM_REQUIRES_PRE@ + at TMP_RPM_REQUIRES_POST@ + at TMP_RPM_REQUIRES_PREUN@ + at TMP_RPM_REQUIRES_POSTUN@ + at TMP_RPM_PROVIDES@ + at TMP_RPM_OBSOLETES@ + at TMP_RPM_CONFLICTS@ + at TMP_RPM_SUGGESTS@ + at TMP_RPM_AUTOPROV@ + at TMP_RPM_AUTOREQ@ + at TMP_RPM_AUTOREQPROV@ + at TMP_RPM_BUILDARCH@ + at TMP_RPM_PREFIXES@ + + at TMP_RPM_DEBUGINFO@ + +%define _rpmdir %_topdir/RPMS +%define _srcrpmdir %_topdir/SRPMS + at FILE_NAME_DEFINE@ +%define _unpackaged_files_terminate_build 0 + at TMP_RPM_SPEC_INSTALL_POST@ + at CPACK_RPM_SPEC_MORE_DEFINE@ + at CPACK_RPM_COMPRESSION_TYPE_TMP@ + +%description + at CPACK_RPM_PACKAGE_DESCRIPTION@ + +# This is a shortcutted spec file generated by CMake RPM generator +# we skip _install step because CPack does that for us. +# We do only save CPack installed tree in _prepr +# and then restore it in build. +%prep +mv $RPM_BUILD_ROOT %_topdir/tmpBBroot + +%install +if [ -e $RPM_BUILD_ROOT ]; +then + rm -rf $RPM_BUILD_ROOT +fi +mv %_topdir/tmpBBroot $RPM_BUILD_ROOT + + at TMP_RPM_DEBUGINFO_INSTALL@ + +%clean + +%post + at RPM_SYMLINK_POSTINSTALL@ + at CPACK_RPM_SPEC_POSTINSTALL@ + +%postun + at CPACK_RPM_SPEC_POSTUNINSTALL@ + +%pre + at CPACK_RPM_SPEC_PREINSTALL@ + +%preun + at CPACK_RPM_SPEC_PREUNINSTALL@ + +%files +%defattr(@TMP_DEFAULT_FILE_PERMISSIONS@, at TMP_DEFAULT_USER@, at TMP_DEFAULT_GROUP@, at TMP_DEFAULT_DIR_PERMISSIONS@) + at CPACK_RPM_INSTALL_FILES@ + at CPACK_RPM_ABSOLUTE_INSTALL_FILES@ + at CPACK_RPM_USER_INSTALL_FILES@ + +%changelog + at CPACK_RPM_SPEC_CHANGELOG@ + + at TMP_OTHER_COMPONENTS@ diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake new file mode 100644 index 0000000..a604863 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake @@ -0,0 +1,9 @@ +install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +if(PACKAGING_TYPE STREQUAL "MONOLITHIC") + set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_LIST_DIR}/custom.spec.in") +elseif(PACKAGING_TYPE STREQUAL "COMPONENT") + install(FILES CMakeLists.txt DESTINATION bar COMPONENT test2) + set(CPACK_RPM_TEST_USER_BINARY_SPECFILE + "${CMAKE_CURRENT_LIST_DIR}/custom.spec.in") +endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce8a4d0a18702cf228beaa6a9ecc7b38e355751 commit 4ce8a4d0a18702cf228beaa6a9ecc7b38e355751 Author: Domen Vrankar AuthorDate: Fri Dec 23 23:26:45 2016 +0100 Commit: Domen Vrankar CommitDate: Mon Jan 9 21:10:16 2017 +0100 CPack test additional std out/err regex file overloads Added std out/std err expected regex file name overloads for packaging type. diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index 89da610..f883c69 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -60,7 +60,11 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK ) foreach(o out err) - if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") + elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt") + elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt") diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index f51d254..7c98f69 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -155,8 +155,18 @@ VerifyResult.cmake script also automatically prints out standard output and standard error from CPack execution phase that is compared with '/-stdout.txt' regular expression and and '/-stderr.txt' regular expresson respectively. -NOTE: For subtests generator name can also be suffixed with subtest name and in - such case subtest file is preferred. +NOTE: For subtests generator name can also be suffixed with subtest name and/or + packaging type (MONOLITHIC, COMPONENT, GROUP) and in such cases the + preferences of which file will be used are as follows: + - generator name + packaging type + subtest name + - generator name + packaging type + - generator name + subtest name + - generator name + - default generator + File name format: '---std.txt' + where can either be 'out' or 'err'. + File name format: '--std.txt' + where can either be 'out' or 'err'. File name format: '--std.txt' where can either be 'out' or 'err'. NOTE: If none of the comparison files are present then the default generator @@ -223,3 +233,4 @@ To add a new generator we must - if needed add 'default_expected_std.txt' files where is either 'out' or 'err' which will contain default expected output of package generation regular expression. +- add generator to list of other CPack generators in RunCMake/CMakeLists.txt https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0bfd3f4f565ea936f665a461380079573521916 commit e0bfd3f4f565ea936f665a461380079573521916 Author: Domen Vrankar AuthorDate: Mon Jan 9 21:07:46 2017 +0100 Commit: Domen Vrankar CommitDate: Mon Jan 9 21:10:03 2017 +0100 CPack/RPM fix - custom binary spec file handling Fixes #16507 diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 5021c41..e1bcb48 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -2470,11 +2470,12 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ endforeach() endif() + set(RPMBUILD_FLAGS "-bb") + # We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE # - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) - set(RPMBUILD_FLAGS "-bb") file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in "# -*- rpm-spec -*- ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Jan 10 02:31:42 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 10 Jan 2017 02:31:42 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1923-g1f2f6e0 Message-ID: <20170110073142.88A68FA4F2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2 (commit) via 23435daa22f650a1a6509025fb2d38e8714f8ceb (commit) via 9a0bf4d558cfd16917d2cb5c41a754740f159c98 (commit) via d9775228dabb1424d2f8d1a250c5a0e6ffad47b1 (commit) from 18e54de628127ac7dd948f473db3977c350c4bca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2 commit 1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2 Merge: 18e54de 23435da Author: Domen Vrankar AuthorDate: Tue Jan 10 02:31:41 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 02:31:41 2017 -0500 Merge topic 'cpack-rpm-user-bin-spec-file-fix' into next 23435daa Revert "CPack/RPM fix - custom binary spec file handling" 9a0bf4d5 Revert "CPack test additional std out/err regex file overloads" d9775228 Revert "CPack/RPM test - custom binary spec file handling" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23435daa22f650a1a6509025fb2d38e8714f8ceb commit 23435daa22f650a1a6509025fb2d38e8714f8ceb Author: Domen Vrankar AuthorDate: Tue Jan 10 08:28:17 2017 +0100 Commit: Domen Vrankar CommitDate: Tue Jan 10 08:28:17 2017 +0100 Revert "CPack/RPM fix - custom binary spec file handling" This reverts commit e0bfd3f4f565ea936f665a461380079573521916. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index e1bcb48..5021c41 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -2470,12 +2470,11 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ endforeach() endif() - set(RPMBUILD_FLAGS "-bb") - # We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE # - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) + set(RPMBUILD_FLAGS "-bb") file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in "# -*- rpm-spec -*- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a0bf4d558cfd16917d2cb5c41a754740f159c98 commit 9a0bf4d558cfd16917d2cb5c41a754740f159c98 Author: Domen Vrankar AuthorDate: Tue Jan 10 08:28:16 2017 +0100 Commit: Domen Vrankar CommitDate: Tue Jan 10 08:28:16 2017 +0100 Revert "CPack test additional std out/err regex file overloads" This reverts commit 4ce8a4d0a18702cf228beaa6a9ecc7b38e355751. diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index f883c69..89da610 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -60,11 +60,7 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK ) foreach(o out err) - if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) - set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") - elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt) - set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt") - elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt") diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index 7c98f69..f51d254 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -155,18 +155,8 @@ VerifyResult.cmake script also automatically prints out standard output and standard error from CPack execution phase that is compared with '/-stdout.txt' regular expression and and '/-stderr.txt' regular expresson respectively. -NOTE: For subtests generator name can also be suffixed with subtest name and/or - packaging type (MONOLITHIC, COMPONENT, GROUP) and in such cases the - preferences of which file will be used are as follows: - - generator name + packaging type + subtest name - - generator name + packaging type - - generator name + subtest name - - generator name - - default generator - File name format: '---std.txt' - where can either be 'out' or 'err'. - File name format: '--std.txt' - where can either be 'out' or 'err'. +NOTE: For subtests generator name can also be suffixed with subtest name and in + such case subtest file is preferred. File name format: '--std.txt' where can either be 'out' or 'err'. NOTE: If none of the comparison files are present then the default generator @@ -233,4 +223,3 @@ To add a new generator we must - if needed add 'default_expected_std.txt' files where is either 'out' or 'err' which will contain default expected output of package generation regular expression. -- add generator to list of other CPack generators in RunCMake/CMakeLists.txt https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9775228dabb1424d2f8d1a250c5a0e6ffad47b1 commit d9775228dabb1424d2f8d1a250c5a0e6ffad47b1 Author: Domen Vrankar AuthorDate: Tue Jan 10 08:28:06 2017 +0100 Commit: Domen Vrankar CommitDate: Tue Jan 10 08:28:06 2017 +0100 Revert "CPack/RPM test - custom binary spec file handling" This reverts commit 699ce812f43553bb6b6732141d62e77716ad8726. diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index d550ec7..3077340 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -4,7 +4,6 @@ include(RunCMake) include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") # run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP "PACKAGING_TYPES" -run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT") run_cpack_test(CUSTOM_NAMES "RPM;DEB" true "COMPONENT") run_cpack_test(DEBUGINFO "RPM" true "COMPONENT") run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT") diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake deleted file mode 100644 index 694dc00..0000000 --- a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") - -if(PACKAGING_TYPE STREQUAL "COMPONENT") - set(EXPECTED_FILES_COUNT "2") - set(EXPECTED_FILE_1_COMPONENT "test") - set(EXPECTED_FILE_2_COMPONENT "test2") - set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") -endif() diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt deleted file mode 100644 index e6d86d0..0000000 --- a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CPackRPM: Will use USER specified spec file: (/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in -CPackRPM: Will use GENERATED spec file:.*/Tests/RunCMake/RPM/CPack/CUSTOM_BINARY_SPEC_FILE-build/_CPack_Packages/.*/RPM/SPECS/custom_binary_spec_file-test2\.spec$ diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt deleted file mode 100644 index d7bb7af..0000000 --- a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -CPackRPM: Will use USER specified spec file: (/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in deleted file mode 100644 index db0ac6f..0000000 --- a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in +++ /dev/null @@ -1,80 +0,0 @@ -# -*- rpm-spec -*- -BuildRoot: %_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@ -Summary: @CPACK_RPM_PACKAGE_SUMMARY@ -Name: @CPACK_RPM_PACKAGE_NAME@ -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@ - - at TMP_RPM_URL@ - at TMP_RPM_REQUIRES@ - at TMP_RPM_REQUIRES_PRE@ - at TMP_RPM_REQUIRES_POST@ - at TMP_RPM_REQUIRES_PREUN@ - at TMP_RPM_REQUIRES_POSTUN@ - at TMP_RPM_PROVIDES@ - at TMP_RPM_OBSOLETES@ - at TMP_RPM_CONFLICTS@ - at TMP_RPM_SUGGESTS@ - at TMP_RPM_AUTOPROV@ - at TMP_RPM_AUTOREQ@ - at TMP_RPM_AUTOREQPROV@ - at TMP_RPM_BUILDARCH@ - at TMP_RPM_PREFIXES@ - - at TMP_RPM_DEBUGINFO@ - -%define _rpmdir %_topdir/RPMS -%define _srcrpmdir %_topdir/SRPMS - at FILE_NAME_DEFINE@ -%define _unpackaged_files_terminate_build 0 - at TMP_RPM_SPEC_INSTALL_POST@ - at CPACK_RPM_SPEC_MORE_DEFINE@ - at CPACK_RPM_COMPRESSION_TYPE_TMP@ - -%description - at CPACK_RPM_PACKAGE_DESCRIPTION@ - -# This is a shortcutted spec file generated by CMake RPM generator -# we skip _install step because CPack does that for us. -# We do only save CPack installed tree in _prepr -# and then restore it in build. -%prep -mv $RPM_BUILD_ROOT %_topdir/tmpBBroot - -%install -if [ -e $RPM_BUILD_ROOT ]; -then - rm -rf $RPM_BUILD_ROOT -fi -mv %_topdir/tmpBBroot $RPM_BUILD_ROOT - - at TMP_RPM_DEBUGINFO_INSTALL@ - -%clean - -%post - at RPM_SYMLINK_POSTINSTALL@ - at CPACK_RPM_SPEC_POSTINSTALL@ - -%postun - at CPACK_RPM_SPEC_POSTUNINSTALL@ - -%pre - at CPACK_RPM_SPEC_PREINSTALL@ - -%preun - at CPACK_RPM_SPEC_PREUNINSTALL@ - -%files -%defattr(@TMP_DEFAULT_FILE_PERMISSIONS@, at TMP_DEFAULT_USER@, at TMP_DEFAULT_GROUP@, at TMP_DEFAULT_DIR_PERMISSIONS@) - at CPACK_RPM_INSTALL_FILES@ - at CPACK_RPM_ABSOLUTE_INSTALL_FILES@ - at CPACK_RPM_USER_INSTALL_FILES@ - -%changelog - at CPACK_RPM_SPEC_CHANGELOG@ - - at TMP_OTHER_COMPONENTS@ diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake deleted file mode 100644 index a604863..0000000 --- a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake +++ /dev/null @@ -1,9 +0,0 @@ -install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) - -if(PACKAGING_TYPE STREQUAL "MONOLITHIC") - set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_LIST_DIR}/custom.spec.in") -elseif(PACKAGING_TYPE STREQUAL "COMPONENT") - install(FILES CMakeLists.txt DESTINATION bar COMPONENT test2) - set(CPACK_RPM_TEST_USER_BINARY_SPECFILE - "${CMAKE_CURRENT_LIST_DIR}/custom.spec.in") -endif() ----------------------------------------------------------------------- Summary of changes: Modules/CPackRPM.cmake | 3 +- Tests/RunCMake/CPack/CPackTestHelpers.cmake | 6 +- Tests/RunCMake/CPack/README.txt | 15 +--- Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 - .../CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake | 9 --- .../RPM-COMPONENT-stderr.txt | 2 - .../RPM-MONOLITHIC-stderr.txt | 1 - .../tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in | 80 -------------------- .../CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake | 9 --- 9 files changed, 4 insertions(+), 122 deletions(-) delete mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake delete mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt delete mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt delete mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in delete mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Jan 10 02:38:13 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 10 Jan 2017 02:38:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1925-g8dc707a Message-ID: <20170110073813.4E1A9FA565@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8dc707a2ffd830f95271275808b645a372e7cebd (commit) via 574c81e28cef6737adc1619ce3b44b43bdcf308b (commit) from 1f2f6e07bb430fb36bba3acef474b2ce8e1ceaa2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8dc707a2ffd830f95271275808b645a372e7cebd commit 8dc707a2ffd830f95271275808b645a372e7cebd Merge: 1f2f6e0 574c81e Author: Domen Vrankar AuthorDate: Tue Jan 10 02:38:12 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 02:38:12 2017 -0500 Merge topic 'cpack-rpm-user-binary-spec-file-fix' into next 574c81e2 CPack/RPM fix - custom binary spec file handling https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=574c81e28cef6737adc1619ce3b44b43bdcf308b commit 574c81e28cef6737adc1619ce3b44b43bdcf308b Author: Domen Vrankar AuthorDate: Tue Jan 10 08:37:14 2017 +0100 Commit: Domen Vrankar CommitDate: Tue Jan 10 08:37:14 2017 +0100 CPack/RPM fix - custom binary spec file handling Fixes #16507 diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 0640630..673aaea 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -2269,8 +2269,8 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ # We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE # - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE + set(RPMBUILD_FLAGS "-bb") if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) - set(RPMBUILD_FLAGS "-bb") file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in "# -*- rpm-spec -*- ----------------------------------------------------------------------- Summary of changes: Modules/CPackRPM.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Jan 10 02:41:10 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 10 Jan 2017 02:41:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1928-gf14f487 Message-ID: <20170110074110.F2C20F50B4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f14f4875429bcc4445ec06328f42d3243bd36892 (commit) via adbf72280d1eb823402c4cc7f2c27ec0ef16062a (commit) via aff368bb8456694e2550e2f69451456728ab31eb (commit) from 8dc707a2ffd830f95271275808b645a372e7cebd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f14f4875429bcc4445ec06328f42d3243bd36892 commit f14f4875429bcc4445ec06328f42d3243bd36892 Merge: 8dc707a adbf722 Author: Domen Vrankar AuthorDate: Tue Jan 10 02:41:09 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 02:41:09 2017 -0500 Merge topic 'cpack-test-extra-std-out-err-file-overloads' into next adbf7228 CPack test additional std out/err regex file overloads aff368bb CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adbf72280d1eb823402c4cc7f2c27ec0ef16062a commit adbf72280d1eb823402c4cc7f2c27ec0ef16062a Author: Domen Vrankar AuthorDate: Fri Dec 23 23:26:45 2016 +0100 Commit: Domen Vrankar CommitDate: Tue Jan 10 08:40:16 2017 +0100 CPack test additional std out/err regex file overloads Added std out/std err expected regex file name overloads for packaging type. diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index 89da610..f883c69 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -60,7 +60,11 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK ) foreach(o out err) - if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") + elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt") + elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt") diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index f51d254..7c98f69 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -155,8 +155,18 @@ VerifyResult.cmake script also automatically prints out standard output and standard error from CPack execution phase that is compared with '/-stdout.txt' regular expression and and '/-stderr.txt' regular expresson respectively. -NOTE: For subtests generator name can also be suffixed with subtest name and in - such case subtest file is preferred. +NOTE: For subtests generator name can also be suffixed with subtest name and/or + packaging type (MONOLITHIC, COMPONENT, GROUP) and in such cases the + preferences of which file will be used are as follows: + - generator name + packaging type + subtest name + - generator name + packaging type + - generator name + subtest name + - generator name + - default generator + File name format: '---std.txt' + where can either be 'out' or 'err'. + File name format: '--std.txt' + where can either be 'out' or 'err'. File name format: '--std.txt' where can either be 'out' or 'err'. NOTE: If none of the comparison files are present then the default generator @@ -223,3 +233,4 @@ To add a new generator we must - if needed add 'default_expected_std.txt' files where is either 'out' or 'err' which will contain default expected output of package generation regular expression. +- add generator to list of other CPack generators in RunCMake/CMakeLists.txt ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Tests/RunCMake/CPack/CPackTestHelpers.cmake | 6 +++++- Tests/RunCMake/CPack/README.txt | 15 +++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:28:38 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:28:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1930-gb641f2b Message-ID: <20170110142838.4D711FA6E8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b641f2b873d55f8ba7b99db906fe6a780a910369 (commit) via 4164078c8540bbf75b47afd5c1bee0acbbd5b253 (commit) from f14f4875429bcc4445ec06328f42d3243bd36892 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b641f2b873d55f8ba7b99db906fe6a780a910369 commit b641f2b873d55f8ba7b99db906fe6a780a910369 Merge: f14f487 4164078 Author: Brad King AuthorDate: Tue Jan 10 09:28:37 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:28:37 2017 -0500 Merge topic '16204-regex-explorer-match-all' into next 4164078c cmake-gui: Add MATCHALL option to Regex Explorer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4164078c8540bbf75b47afd5c1bee0acbbd5b253 commit 4164078c8540bbf75b47afd5c1bee0acbbd5b253 Author: Gregor Jasny AuthorDate: Tue Dec 27 16:38:09 2016 +0100 Commit: Brad King CommitDate: Tue Jan 10 09:28:13 2017 -0500 cmake-gui: Add MATCHALL option to Regex Explorer Closes: #16204 diff --git a/Source/QtDialog/RegexExplorer.cxx b/Source/QtDialog/RegexExplorer.cxx index 1512166..abed70e 100644 --- a/Source/QtDialog/RegexExplorer.cxx +++ b/Source/QtDialog/RegexExplorer.cxx @@ -64,10 +64,32 @@ void RegexExplorer::on_inputText_textChanged() return; } + std::string matchingText; + + if (matchAll->isChecked()) { + const char* p = m_text.c_str(); + while (m_regexParser.find(p)) { + std::string::size_type l = m_regexParser.start(); + std::string::size_type r = m_regexParser.end(); + if (r - l == 0) { + // matched empty string + clearMatch(); + return; + } + if (!matchingText.empty()) { + matchingText += ";"; + } + matchingText += std::string(p + l, r - l); + p += r; + } + } else { + matchingText = m_regexParser.match(0); + } + #ifdef QT_NO_STL - QString matchText = m_regexParser.match(0).c_str(); + QString matchText = matchingText.c_str(); #else - QString matchText = QString::fromStdString(m_regexParser.match(0)); + QString matchText = QString::fromStdString(matchingText); #endif match0->setPlainText(matchText); @@ -95,8 +117,16 @@ void RegexExplorer::on_matchNumber_currentIndexChanged(int index) matchN->setPlainText(match); } +void RegexExplorer::on_matchAll_toggled(bool checked) +{ + Q_UNUSED(checked); + + on_inputText_textChanged(); +} + void RegexExplorer::clearMatch() { + m_matched = false; match0->clear(); matchN->clear(); } diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h index f1c1e5f..caef975 100644 --- a/Source/QtDialog/RegexExplorer.h +++ b/Source/QtDialog/RegexExplorer.h @@ -22,6 +22,7 @@ private slots: void on_regularExpression_textChanged(const QString& text); void on_inputText_textChanged(); void on_matchNumber_currentIndexChanged(int index); + void on_matchAll_toggled(bool checked); private: static void setStatusColor(QWidget* widget, bool successful); diff --git a/Source/QtDialog/RegexExplorer.ui b/Source/QtDialog/RegexExplorer.ui index 2c2d761..0af69999 100644 --- a/Source/QtDialog/RegexExplorer.ui +++ b/Source/QtDialog/RegexExplorer.ui @@ -104,11 +104,38 @@ - - - Complete Match - - + + + + + Complete Match + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + Match All + + + + ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:34:45 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:34:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-945-g9239141 Message-ID: <20170110143445.C9291FA81A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9239141e954c6b9eaba53fcad46fa2de24d8ba44 (commit) via 0471d13ecd2ff4d4a0e824a1b1d0d850ea070d05 (commit) via c0bd1eb6d0da40d429120e925aa755a1f5a754e8 (commit) via 33e628ee809cd1d7ec2a8a0290ac0351fa4d499b (commit) from aff368bb8456694e2550e2f69451456728ab31eb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9239141e954c6b9eaba53fcad46fa2de24d8ba44 commit 9239141e954c6b9eaba53fcad46fa2de24d8ba44 Merge: aff368b 0471d13 Author: Brad King AuthorDate: Tue Jan 10 09:34:43 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:34:43 2017 -0500 Merge topic 'cmake-server-do-not-crash-on-interface-lib-for-master' 0471d13e Merge branch 'cmake-server-do-not-crash-on-interface-lib' into cmake-server-do-not-crash-on-interface-lib-for-master c0bd1eb6 server-mode: Do not crash when running into INTERFACE_LIBRARY 33e628ee server-mode: Do not crash when running into INTERFACE_LIBRARY ----------------------------------------------------------------------- Summary of changes: Source/cmServerProtocol.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:34:49 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:34:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-947-gea62999 Message-ID: <20170110143449.1115DFA820@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ea62999f457a4263702a7f01e2c9bd8070da1e01 (commit) via 574c81e28cef6737adc1619ce3b44b43bdcf308b (commit) from 9239141e954c6b9eaba53fcad46fa2de24d8ba44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea62999f457a4263702a7f01e2c9bd8070da1e01 commit ea62999f457a4263702a7f01e2c9bd8070da1e01 Merge: 9239141 574c81e Author: Brad King AuthorDate: Tue Jan 10 09:34:46 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:34:46 2017 -0500 Merge topic 'cpack-rpm-user-binary-spec-file-fix' 574c81e2 CPack/RPM fix - custom binary spec file handling ----------------------------------------------------------------------- Summary of changes: Modules/CPackRPM.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:34:52 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:34:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-949-g039a7df Message-ID: <20170110143452.032CFFA822@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 039a7df9bada6d061f34728a0bb57fdcb9e277c1 (commit) via adbf72280d1eb823402c4cc7f2c27ec0ef16062a (commit) from ea62999f457a4263702a7f01e2c9bd8070da1e01 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=039a7df9bada6d061f34728a0bb57fdcb9e277c1 commit 039a7df9bada6d061f34728a0bb57fdcb9e277c1 Merge: ea62999 adbf722 Author: Brad King AuthorDate: Tue Jan 10 09:34:49 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:34:49 2017 -0500 Merge topic 'cpack-test-extra-std-out-err-file-overloads' adbf7228 CPack test additional std out/err regex file overloads ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CPack/CPackTestHelpers.cmake | 6 +++++- Tests/RunCMake/CPack/README.txt | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:34:55 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:34:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-951-g2c8eb26 Message-ID: <20170110143455.0A351FA822@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2c8eb2696a8f3505d45ed5accfa94b3e5541e169 (commit) via 6daa2d384ef7f6f9edd5fed18c830168f7496881 (commit) from 039a7df9bada6d061f34728a0bb57fdcb9e277c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c8eb2696a8f3505d45ed5accfa94b3e5541e169 commit 2c8eb2696a8f3505d45ed5accfa94b3e5541e169 Merge: 039a7df 6daa2d3 Author: Brad King AuthorDate: Tue Jan 10 09:34:52 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:34:52 2017 -0500 Merge topic 'cpack-deb-md5sums-paths-fix' 6daa2d38 CPack/Deb invalid md5sums file fix ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackDebGenerator.cxx | 6 +++++- Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + Tests/RunCMake/CPack/tests/{DIST => MD5SUMS}/ExpectedFiles.cmake | 0 Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake | 3 +++ Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake | 5 +++++ 5 files changed, 14 insertions(+), 1 deletion(-) copy Tests/RunCMake/CPack/tests/{DIST => MD5SUMS}/ExpectedFiles.cmake (100%) create mode 100644 Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:34:58 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:34:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-955-gc43cf15 Message-ID: <20170110143458.36DBCFA820@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c43cf158d74460440dc5a3d0aec984c754f57958 (commit) via 36bc7e4c3f91c560df8051afedddea3f49474264 (commit) via 05c14ea0a97f3e8a7287f3e0bbc57f91e2a6e490 (commit) via 5b0a64ebc5d03a4dd0022b87e8e6cb77c3db013b (commit) from 2c8eb2696a8f3505d45ed5accfa94b3e5541e169 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c43cf158d74460440dc5a3d0aec984c754f57958 commit c43cf158d74460440dc5a3d0aec984c754f57958 Merge: 2c8eb26 36bc7e4 Author: Brad King AuthorDate: Tue Jan 10 09:34:55 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:34:55 2017 -0500 Merge topic 'cpack-new-tests' 36bc7e4c store old locale to a temporary variable 05c14ea0 RunCMake.CPack_* add COMPONENT to minimal test 5b0a64eb CPack/Archive minimal tests for more formats ----------------------------------------------------------------------- Summary of changes: Source/cmLocale.h | 5 +- Tests/RunCMake/CMakeLists.txt | 2 +- Tests/RunCMake/CPack/7Z/Helpers.cmake | 3 + .../CPack/{TGZ => 7Z}/Prerequirements.cmake | 0 .../{TGZ => 7Z}/packaging_COMPONENT_default.cmake | 0 .../common_helpers.cmake} | 16 ++--- Tests/RunCMake/CPack/RunCMakeTest.cmake | 2 +- Tests/RunCMake/CPack/TBZ2/Helpers.cmake | 3 + .../CPack/{TGZ => TBZ2}/Prerequirements.cmake | 0 .../packaging_COMPONENT_default.cmake | 0 Tests/RunCMake/CPack/TGZ/Helpers.cmake | 63 +------------------- Tests/RunCMake/CPack/TXZ/Helpers.cmake | 3 + .../CPack/{TGZ => TXZ}/Prerequirements.cmake | 0 .../{TGZ => TXZ}/packaging_COMPONENT_default.cmake | 0 Tests/RunCMake/CPack/TZ/Helpers.cmake | 3 + .../CPack/{TGZ => TZ}/Prerequirements.cmake | 0 .../{TGZ => TZ}/packaging_COMPONENT_default.cmake | 0 Tests/RunCMake/CPack/ZIP/Helpers.cmake | 3 + .../CPack/{TGZ => ZIP}/Prerequirements.cmake | 0 .../{TGZ => ZIP}/packaging_COMPONENT_default.cmake | 0 Tests/RunCMake/CPack/tests/MINIMAL/test.cmake | 4 ++ 21 files changed, 34 insertions(+), 73 deletions(-) create mode 100644 Tests/RunCMake/CPack/7Z/Helpers.cmake copy Tests/RunCMake/CPack/{TGZ => 7Z}/Prerequirements.cmake (100%) copy Tests/RunCMake/CPack/{TGZ => 7Z}/packaging_COMPONENT_default.cmake (100%) copy Tests/RunCMake/CPack/{TGZ/Helpers.cmake => ArchiveCommon/common_helpers.cmake} (77%) create mode 100644 Tests/RunCMake/CPack/TBZ2/Helpers.cmake copy Tests/RunCMake/CPack/{TGZ => TBZ2}/Prerequirements.cmake (100%) copy Tests/RunCMake/CPack/{TGZ => TBZ2}/packaging_COMPONENT_default.cmake (100%) create mode 100644 Tests/RunCMake/CPack/TXZ/Helpers.cmake copy Tests/RunCMake/CPack/{TGZ => TXZ}/Prerequirements.cmake (100%) copy Tests/RunCMake/CPack/{TGZ => TXZ}/packaging_COMPONENT_default.cmake (100%) create mode 100644 Tests/RunCMake/CPack/TZ/Helpers.cmake copy Tests/RunCMake/CPack/{TGZ => TZ}/Prerequirements.cmake (100%) copy Tests/RunCMake/CPack/{TGZ => TZ}/packaging_COMPONENT_default.cmake (100%) create mode 100644 Tests/RunCMake/CPack/ZIP/Helpers.cmake copy Tests/RunCMake/CPack/{TGZ => ZIP}/Prerequirements.cmake (100%) copy Tests/RunCMake/CPack/{TGZ => ZIP}/packaging_COMPONENT_default.cmake (100%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:35:00 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:35:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-957-g914728f Message-ID: <20170110143500.EFB04FA81F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 914728f8d724e834a402619d05309ad8154ba59d (commit) via 4164078c8540bbf75b47afd5c1bee0acbbd5b253 (commit) from c43cf158d74460440dc5a3d0aec984c754f57958 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=914728f8d724e834a402619d05309ad8154ba59d commit 914728f8d724e834a402619d05309ad8154ba59d Merge: c43cf15 4164078 Author: Brad King AuthorDate: Tue Jan 10 09:34:58 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:34:58 2017 -0500 Merge topic '16204-regex-explorer-match-all' 4164078c cmake-gui: Add MATCHALL option to Regex Explorer ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/RegexExplorer.cxx | 34 ++++++++++++++++++++++++++++++++-- Source/QtDialog/RegexExplorer.h | 1 + Source/QtDialog/RegexExplorer.ui | 37 ++++++++++++++++++++++++++++++++----- 3 files changed, 65 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:35:16 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:35:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1937-g89a350e Message-ID: <20170110143516.02FDDFA820@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 89a350e455008070ec9c4c6ed55e1e4fb681921b (commit) via 914728f8d724e834a402619d05309ad8154ba59d (commit) via c43cf158d74460440dc5a3d0aec984c754f57958 (commit) via 2c8eb2696a8f3505d45ed5accfa94b3e5541e169 (commit) via 039a7df9bada6d061f34728a0bb57fdcb9e277c1 (commit) via ea62999f457a4263702a7f01e2c9bd8070da1e01 (commit) via 9239141e954c6b9eaba53fcad46fa2de24d8ba44 (commit) from b641f2b873d55f8ba7b99db906fe6a780a910369 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89a350e455008070ec9c4c6ed55e1e4fb681921b commit 89a350e455008070ec9c4c6ed55e1e4fb681921b Merge: b641f2b 914728f Author: Brad King AuthorDate: Tue Jan 10 09:35:06 2017 -0500 Commit: Brad King CommitDate: Tue Jan 10 09:35:06 2017 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 09:53:51 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 09:53:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1939-g4b74150 Message-ID: <20170110145351.67923FA3EB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 4b74150218a9c0ab28070d10c87f4391b724bba6 (commit) via 5ffee691ee0c55d043238960cf1149cbcfb86047 (commit) from 89a350e455008070ec9c4c6ed55e1e4fb681921b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b74150218a9c0ab28070d10c87f4391b724bba6 commit 4b74150218a9c0ab28070d10c87f4391b724bba6 Merge: 89a350e 5ffee69 Author: Brad King AuthorDate: Tue Jan 10 09:53:50 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 09:53:50 2017 -0500 Merge topic 'pgsql-yum' into next 5ffee691 FindPostgreSQL: automatically find installations from yum.postgresql.org https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ffee691ee0c55d043238960cf1149cbcfb86047 commit 5ffee691ee0c55d043238960cf1149cbcfb86047 Author: Rolf Eike Beer AuthorDate: Thu Dec 29 11:05:36 2016 +0100 Commit: Brad King CommitDate: Tue Jan 10 09:52:42 2017 -0500 FindPostgreSQL: automatically find installations from yum.postgresql.org In commit v3.3.0-rc1~4^2 (FindPostgreSQL: Search some more common packaging locations) the PostgreSQL_ADDITIONAL_SEARCH_PATHS variable was removed. This was used e.g. by osm2pgsql to be able to build on CentOS with recent PostgreSQL versions. At least add those locations from yum.postgresql.org, which is a more or less official location. diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index 874128c..9e2194c 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -88,8 +88,13 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS}) "PostgreSQL/${suffix}/include/server") endif() if(UNIX) + list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES + "pgsql-${suffix}/lib") + list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES + "pgsql-${suffix}/include") list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES - "postgresql/${suffix}/server") + "postgresql/${suffix}/server" + "pgsql-${suffix}/include/server") endif() endforeach() ----------------------------------------------------------------------- Summary of changes: Modules/FindPostgreSQL.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 10:23:19 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 10:23:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1951-g29234c0 Message-ID: <20170110152319.563B9FA650@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 29234c055a20494f76f9653fa11df5bc7d901ebd (commit) via c52e556f1324662f168daf8e32366e3144e523d0 (commit) via eabef10641eb8c995a5e1f732b4d2c2caea1b655 (commit) via 372f25218eaecf27916760990c39ffdf376494e3 (commit) via 0db926e9ea39c71cf8caa15bfaebc1a1474613be (commit) via eb0d73faea66a440ff5594752de1d251e81dbbd4 (commit) via a899d1f02d75de80161dcd6544ddacd45d231c84 (commit) via cf394dbe507c5bcd076c02c9654eb44174682ad7 (commit) via 5443e3966190b3e4aaad445e2a406d6ac9d0d9fa (commit) via d17683e7dfee0bc7b12afbd62e57c7d512cbc73a (commit) via 306c30e6007215ff4adfa9c5be28284ba8ac05ad (commit) via bc5d62e4f7e190b567fd5e9f5364fa78da076ff5 (commit) from 4b74150218a9c0ab28070d10c87f4391b724bba6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=29234c055a20494f76f9653fa11df5bc7d901ebd commit 29234c055a20494f76f9653fa11df5bc7d901ebd Merge: 4b74150 c52e556 Author: Brad King AuthorDate: Tue Jan 10 10:23:17 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 10:23:17 2017 -0500 Merge topic 'cuda-windows' into next c52e556f CUDA: Enable CudaOnly.SeparateCompilation test runtime calls eabef106 CUDA: Port test cases to Windows with MSVC host compiler 372f2521 CUDA: Populate NVIDIA compiler information on Windows 0db926e9 CUDA: Detect implicit link information on Windows eb0d73fa CUDA: Find MSVC binutils on Windows a899d1f0 CUDA: Populate compiler PDB placeholder during device linking cf394dbe CUDA: Use `.obj` object file extension on Windows 5443e396 CUDA: Detect MSVC architecture id d17683e7 CUDA: Detect use of MSVC host compiler 306c30e6 CUDA: Allow platform files to set device linking rules bc5d62e4 CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c52e556f1324662f168daf8e32366e3144e523d0 commit c52e556f1324662f168daf8e32366e3144e523d0 Author: Brad King AuthorDate: Thu Dec 15 15:17:08 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:12:15 2016 -0500 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls Uncomment the calls in `main.cpp` (and fix the signatures). diff --git a/Tests/CudaOnly/SeparateCompilation/main.cu b/Tests/CudaOnly/SeparateCompilation/main.cu index d4520ae..5c8e150 100644 --- a/Tests/CudaOnly/SeparateCompilation/main.cu +++ b/Tests/CudaOnly/SeparateCompilation/main.cu @@ -4,12 +4,12 @@ #include "file1.h" #include "file2.h" -// result_type file4_launch_kernel(int x); -// result_type file5_launch_kernel(int x); +int file4_launch_kernel(int x); +int file5_launch_kernel(int x); int main(int argc, char **argv) { - // file4_launch_kernel(42); - // file5_launch_kernel(42); + file4_launch_kernel(42); + file5_launch_kernel(42); return 0; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eabef10641eb8c995a5e1f732b4d2c2caea1b655 commit eabef10641eb8c995a5e1f732b4d2c2caea1b655 Author: Brad King AuthorDate: Wed Dec 7 11:45:44 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:12:14 2016 -0500 CUDA: Port test cases to Windows with MSVC host compiler diff --git a/Tests/Cuda/Complex/dynamic.cpp b/Tests/Cuda/Complex/dynamic.cpp index d579f1e..3848ce7 100644 --- a/Tests/Cuda/Complex/dynamic.cpp +++ b/Tests/Cuda/Complex/dynamic.cpp @@ -1,5 +1,11 @@ -int dynamic_base_func(int x) +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + +EXPORT int dynamic_base_func(int x) { return x * x; } diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu index ea52acb..a23dc25 100644 --- a/Tests/Cuda/Complex/dynamic.cu +++ b/Tests/Cuda/Complex/dynamic.cu @@ -3,9 +3,15 @@ #include #include +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + int dynamic_base_func(int); -int __host__ cuda_dynamic_host_func(int x) +EXPORT int __host__ cuda_dynamic_host_func(int x) { return dynamic_base_func(x); } @@ -16,7 +22,7 @@ void DetermineIfValidCudaDevice() { } -void cuda_dynamic_lib_func() +EXPORT void cuda_dynamic_lib_func() { DetermineIfValidCudaDevice <<<1,1>>> (); cudaError_t err = cudaGetLastError(); diff --git a/Tests/Cuda/Complex/main.cpp b/Tests/Cuda/Complex/main.cpp index 32312d0..5a3f820 100644 --- a/Tests/Cuda/Complex/main.cpp +++ b/Tests/Cuda/Complex/main.cpp @@ -3,8 +3,14 @@ #include "file1.h" #include "file2.h" -int call_cuda_seperable_code(int x); -int mixed_launch_kernel(int x); +#ifdef _WIN32 +#define IMPORT __declspec(dllimport) +#else +#define IMPORT +#endif + +IMPORT int call_cuda_seperable_code(int x); +IMPORT int mixed_launch_kernel(int x); int main(int argc, char** argv) { diff --git a/Tests/Cuda/Complex/mixed.cpp b/Tests/Cuda/Complex/mixed.cpp index 205f091..bd32e51 100644 --- a/Tests/Cuda/Complex/mixed.cpp +++ b/Tests/Cuda/Complex/mixed.cpp @@ -1,6 +1,14 @@ +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#define IMPORT __declspec(dllimport) +#else +#define EXPORT +#define IMPORT +#endif + int dynamic_base_func(int); -int cuda_dynamic_host_func(int); +IMPORT int cuda_dynamic_host_func(int); int file3_launch_kernel(int); int dynamic_final_func(int x) @@ -8,7 +16,7 @@ int dynamic_final_func(int x) return cuda_dynamic_host_func(dynamic_base_func(x)); } -int call_cuda_seperable_code(int x) +EXPORT int call_cuda_seperable_code(int x) { return file3_launch_kernel(x); } diff --git a/Tests/Cuda/Complex/mixed.cu b/Tests/Cuda/Complex/mixed.cu index 45b412f..7051de0 100644 --- a/Tests/Cuda/Complex/mixed.cu +++ b/Tests/Cuda/Complex/mixed.cu @@ -4,10 +4,18 @@ #include "file1.h" #include "file2.h" +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#define IMPORT __declspec(dllimport) +#else +#define EXPORT +#define IMPORT +#endif + result_type __device__ file1_func(int x); result_type_dynamic __device__ file2_func(int x); -void __host__ cuda_dynamic_lib_func(); +IMPORT void __host__ cuda_dynamic_lib_func(); static __global__ @@ -17,7 +25,7 @@ void mixed_kernel(result_type& r, int x) result_type_dynamic rd = file2_func(x); } -int mixed_launch_kernel(int x) +EXPORT int mixed_launch_kernel(int x) { cuda_dynamic_lib_func(); diff --git a/Tests/CudaOnly/EnableStandard/main.cu b/Tests/CudaOnly/EnableStandard/main.cu index 83e9dfd..f7144e6 100644 --- a/Tests/CudaOnly/EnableStandard/main.cu +++ b/Tests/CudaOnly/EnableStandard/main.cu @@ -1,8 +1,14 @@ #include +#ifdef _WIN32 +#define IMPORT __declspec(dllimport) +#else +#define IMPORT +#endif + int static_cuda11_func(int); -int shared_cuda11_func(int); +IMPORT int shared_cuda11_func(int); void test_functions() { diff --git a/Tests/CudaOnly/EnableStandard/shared.cu b/Tests/CudaOnly/EnableStandard/shared.cu index 28555b3..ccdd0b2 100644 --- a/Tests/CudaOnly/EnableStandard/shared.cu +++ b/Tests/CudaOnly/EnableStandard/shared.cu @@ -1,9 +1,15 @@ #include +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + using tt = std::true_type; using ft = std::false_type; -int __host__ shared_cuda11_func(int x) +EXPORT int __host__ shared_cuda11_func(int x) { return x * x + std::integral_constant::value; } diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index c4ca8b9..6c4011c 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -4,7 +4,12 @@ project (CudaOnlyWithDefs CUDA) #verify that we can pass explicit cuda arch flags set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30") -set(debug_compile_flags --generate-code arch=compute_20,code=sm_20 -Xcompiler=-Werror) +set(debug_compile_flags --generate-code arch=compute_20,code=sm_20) +if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + list(APPEND debug_compile_flags -Xcompiler=-WX) +else() + list(APPEND debug_compile_flags -Xcompiler=-Werror) +endif() set(release_compile_defs DEFREL) #Goal for this example: diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu index 33a49d2..67bf10c 100644 --- a/Tests/CudaOnly/WithDefs/main.notcu +++ b/Tests/CudaOnly/WithDefs/main.notcu @@ -2,12 +2,21 @@ #include #include +#ifndef PACKED_DEFINE +#error "PACKED_DEFINE not defined!" +#endif + static __global__ void DetermineIfValidCudaDevice() { } +#ifdef _MSC_VER +#pragma pack(push,1) +#undef PACKED_DEFINE +#define PACKED_DEFINE +#endif struct PACKED_DEFINE result_type { bool valid; @@ -16,6 +25,9 @@ struct PACKED_DEFINE result_type #error missing DEFREL flag #endif }; +#ifdef _MSC_VER +#pragma pack(pop) +#endif result_type can_launch_kernel() { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=372f25218eaecf27916760990c39ffdf376494e3 commit 372f25218eaecf27916760990c39ffdf376494e3 Author: Brad King AuthorDate: Tue Dec 13 13:10:12 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:12:14 2016 -0500 CUDA: Populate NVIDIA compiler information on Windows Port Windows-specific compilation and linking rules over from the `Platform/Windows-MSVC` module and adapt it for NVIDIA CUDA. On Windows nvcc and its host compiler (MSVC) do not understand or use options like `-fPIC` or `-std=`, so condition those out. diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 605d555..ae35132 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -1,14 +1,15 @@ set(CMAKE_CUDA_VERBOSE_FLAG "-v") - -set(CMAKE_CUDA_COMPILE_OPTIONS_PIE -Xcompiler=-fPIE) -set(CMAKE_CUDA_COMPILE_OPTIONS_PIC -Xcompiler=-fPIC) -#CMAKE_SHARED_LIBRARY_CUDA_FLAGS is sent to the host linker so we don' need -#to forward it through nvcc -set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC) +if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_COMPILE_OPTIONS_PIE -Xcompiler=-fPIE) + set(CMAKE_CUDA_COMPILE_OPTIONS_PIC -Xcompiler=-fPIC) + set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=) + # CMAKE_SHARED_LIBRARY_CUDA_FLAGS is sent to the host linker so we + # don't need to forward it through nvcc. + set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC) +endif() set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared) set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=) -set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=) string(APPEND CMAKE_CUDA_FLAGS_INIT " ") string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -g") @@ -16,9 +17,12 @@ string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") -set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "") -set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "") -set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11") -set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11") - -set(CMAKE_CUDA_STANDARD_DEFAULT 98) +if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_STANDARD_DEFAULT "") +else() + set(CMAKE_CUDA_STANDARD_DEFAULT 98) + set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11") +endif() diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake new file mode 100644 index 0000000..80ecfbc --- /dev/null +++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake @@ -0,0 +1,42 @@ +include(Platform/Windows-MSVC) + +set(CMAKE_CUDA_COMPILE_PTX_COMPILATION + " ${CMAKE_CUDA_HOST_FLAGS} -x cu -ptx -o -Xcompiler=-Fd,-FS") +set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION + " ${CMAKE_CUDA_HOST_FLAGS} -x cu -dc -o -Xcompiler=-Fd,-FS") +set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION + " ${CMAKE_CUDA_HOST_FLAGS} -x cu -c -o -Xcompiler=-Fd,-FS") + +set(__IMPLICT_LINKS ) +foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES}) + string(APPEND __IMPLICT_LINKS " -LIBPATH:\"${dir}\"") +endforeach() +foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES}) + string(APPEND __IMPLICT_LINKS " \"${lib}\"") +endforeach() +set(CMAKE_CUDA_LINK_EXECUTABLE + " /out: /implib: /pdb: /version:. ${__IMPLICT_LINKS}") + +set(_CMAKE_VS_LINK_DLL " -E vs_link_dll --intdir= --manifests -- ") +set(_CMAKE_VS_LINK_EXE " -E vs_link_exe --intdir= --manifests -- ") +set(CMAKE_CUDA_CREATE_SHARED_LIBRARY + "${_CMAKE_VS_LINK_DLL} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /dll /version:.${_PLATFORM_LINK_FLAGS} ${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}") + +set(CMAKE_CUDA_CREATE_SHARED_MODULE ${CMAKE_CUDA_CREATE_SHARED_LIBRARY}) +set(CMAKE_CUDA_CREATE_STATIC_LIBRARY " /lib ${CMAKE_CL_NOLOGO} /out: ") +set(CMAKE_CUDA_LINKER_SUPPORTS_PDB ON) +set(CMAKE_CUDA_LINK_EXECUTABLE + "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /version:.${_PLATFORM_LINK_FLAGS} ${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}") +unset(_CMAKE_VS_LINK_EXE) +unset(_CMAKE_VS_LINK_EXE) + +set(CMAKE_CUDA_DEVICE_LINK_LIBRARY + " -shared -dlink -o -Xcompiler=-Fd,-FS") +set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE + " -shared -dlink -o -Xcompiler=-Fd,-FS") + +string(APPEND CMAKE_CUDA_FLAGS_INIT " -Xcompiler=-GR,-EHsc") +string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -Xcompiler=-MDd,-Zi,-RTC1") +string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -Xcompiler=-MD") +string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -Xcompiler=-MD") +string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Xcompiler=-MD") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0db926e9ea39c71cf8caa15bfaebc1a1474613be commit 0db926e9ea39c71cf8caa15bfaebc1a1474613be Author: Brad King AuthorDate: Tue Dec 13 13:06:49 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:12:14 2016 -0500 CUDA: Detect implicit link information on Windows The `nvcc -v` output on Windows uses response files, so load the one we need to extract the full link line. diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 22c53d9..bef6d0e 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -60,7 +60,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCUDA/(\\./)?(CompilerIdCUDA.xctest/)?CompilerIdCUDA[ \t\n\\\"]") set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_INDEX 2) - set(CMAKE_CUDA_COMPILER_ID_FLAGS_ALWAYS "-v") + set(CMAKE_CUDA_COMPILER_ID_FLAGS_ALWAYS -v --keep --keep-dir tmp) if(CMAKE_CUDA_HOST_COMPILER) list(APPEND CMAKE_CUDA_COMPILER_ID_FLAGS_ALWAYS "-ccbin=${CMAKE_CUDA_HOST_COMPILER}") endif() @@ -106,6 +106,14 @@ if(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA) if("${_nvcc_output_line}" MATCHES "^ *nvlink") string(APPEND _nvcc_log " ignoring nvlink line\n") elseif(_nvcc_libraries) + if("${_nvcc_output_line}" MATCHES "(@\"?tmp/a\\.exe\\.res\"?)") + set(_nvcc_link_res_arg "${CMAKE_MATCH_1}") + set(_nvcc_link_res "${CMAKE_PLATFORM_INFO_DIR}/CompilerIdCUDA/tmp/a.exe.res") + if(EXISTS "${_nvcc_link_res}") + file(READ "${_nvcc_link_res}" _nvcc_link_res_content) + string(REPLACE "${_nvcc_link_res_arg}" "${_nvcc_link_res_content}" _nvcc_output_line "${_nvcc_output_line}") + endif() + endif() string(FIND "${_nvcc_output_line}" "${_nvcc_libraries}" _nvcc_libraries_pos) if(NOT _nvcc_libraries_pos EQUAL -1) set(_nvcc_link_line "${_nvcc_output_line}") diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index eae139d..bb34de5 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -131,6 +131,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src) # Create a clean working directory. file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR}) file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}) + file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}/tmp) CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}") # Construct a description of this test case. diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake index 670b31d..80113cb 100644 --- a/Modules/CMakeTestCUDACompiler.cmake +++ b/Modules/CMakeTestCUDACompiler.cmake @@ -58,6 +58,11 @@ else() include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) CMAKE_DETERMINE_COMPILER_ABI(CUDA ${CMAKE_ROOT}/Modules/CMakeCUDACompilerABI.cu) + if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES "${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES}") + set(CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES "${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES}") + endif() + # Re-configure to save learned information. configure_file( ${CMAKE_ROOT}/Modules/CMakeCUDACompiler.cmake.in https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb0d73faea66a440ff5594752de1d251e81dbbd4 commit eb0d73faea66a440ff5594752de1d251e81dbbd4 Author: Brad King AuthorDate: Tue Dec 13 13:05:20 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:12:13 2016 -0500 CUDA: Find MSVC binutils on Windows On Windows the host link launcher is just `link.exe`. Find and use that instead of trying to extract the launcher from the `nvcc -v` output. diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index d3024c7..22c53d9 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -116,9 +116,13 @@ if(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA) endif() if(_nvcc_link_line) - #extract the compiler that is being used for linking - separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}") - list(GET _nvcc_link_line_args 0 CMAKE_CUDA_HOST_LINK_LAUNCHER) + if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_HOST_LINK_LAUNCHER "${CMAKE_LINKER}") + else() + #extract the compiler that is being used for linking + separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}") + list(GET _nvcc_link_line_args 0 CMAKE_CUDA_HOST_LINK_LAUNCHER) + endif() #prefix the line with cuda-fake-ld so that implicit link info believes it is #a link line diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 75a031e..4c0486e 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -25,6 +25,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC" OR (CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a899d1f02d75de80161dcd6544ddacd45d231c84 commit a899d1f02d75de80161dcd6544ddacd45d231c84 Author: Brad King AuthorDate: Tue Dec 13 13:02:11 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:11:31 2016 -0500 CUDA: Populate compiler PDB placeholder during device linking The device link step runs the host compiler internally so we need to use the proper compiler PDB file with MSVC. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 480bb34..4bc706c 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -230,6 +230,11 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( this->LocalGenerator->GetCurrentBinaryDirectory(), targetOutputReal), output); + std::string targetFullPathCompilePDB = this->ComputeTargetCompilePDB(); + std::string targetOutPathCompilePDB = + this->LocalGenerator->ConvertToOutputFormat(targetFullPathCompilePDB, + cmOutputConverter::SHELL); + vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); vars.ObjectDir = objectDir.c_str(); @@ -237,6 +242,7 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( vars.LinkLibraries = linkLibs.c_str(); vars.Flags = flags.c_str(); vars.LinkFlags = linkFlags.c_str(); + vars.TargetCompilePDB = targetOutPathCompilePDB.c_str(); std::string launcher; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index d4ad16d..27b7c21 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -366,12 +366,18 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules( this->LocalGenerator->GetCurrentBinaryDirectory(), targetOutputReal), output); + std::string targetFullPathCompilePDB = this->ComputeTargetCompilePDB(); + std::string targetOutPathCompilePDB = + this->LocalGenerator->ConvertToOutputFormat(targetFullPathCompilePDB, + cmOutputConverter::SHELL); + vars.Objects = buildObjs.c_str(); vars.ObjectDir = objectDir.c_str(); vars.Target = target.c_str(); vars.LinkLibraries = linkLibs.c_str(); vars.ObjectsQuoted = buildObjs.c_str(); vars.LinkFlags = linkFlags.c_str(); + vars.TargetCompilePDB = targetOutPathCompilePDB.c_str(); // Add language feature flags. std::string langFlags; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 10ee70d..bc8d8ff 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -229,6 +229,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile) vars.SONameFlag = "$SONAME_FLAG"; vars.TargetSOName = "$SONAME"; vars.TargetPDB = "$TARGET_PDB"; + vars.TargetCompilePDB = "$TARGET_COMPILE_PDB"; vars.Flags = "$FLAGS"; vars.LinkFlags = "$LINK_FLAGS"; @@ -716,6 +717,8 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement() this->ConvertToNinjaPath(objPath), cmOutputConverter::SHELL); EnsureDirectoryExists(objPath); + this->SetMsvcTargetPdbVariable(vars); + if (this->GetGlobalGenerator()->IsGCCOnWindows()) { // ar.exe can't handle backslashes in rsp files (implicitly used by gcc) std::string& linkLibraries = vars["LINK_LIBRARIES"]; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf394dbe507c5bcd076c02c9654eb44174682ad7 commit cf394dbe507c5bcd076c02c9654eb44174682ad7 Author: Brad King AuthorDate: Tue Dec 13 13:01:49 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:10:41 2016 -0500 CUDA: Use `.obj` object file extension on Windows diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index cb0eef5..abc4b66 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -1,7 +1,11 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -set(CMAKE_CUDA_OUTPUT_EXTENSION .o) +if(UNIX) + set(CMAKE_CUDA_OUTPUT_EXTENSION .o) +else() + set(CMAKE_CUDA_OUTPUT_EXTENSION .obj) +endif() set(CMAKE_INCLUDE_FLAG_CUDA "-I") # Load compiler-specific information. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 069011d..480bb34 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -104,10 +104,12 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( // Get the language to use for linking this library. std::string linkLanguage = "CUDA"; + std::string const objExt = + this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); // Get the name of the device object to generate. std::string const targetOutputReal = - this->GeneratorTarget->ObjectDirectory + "cmake_device_link.o"; + this->GeneratorTarget->ObjectDirectory + "cmake_device_link" + objExt; this->DeviceLinkObject = targetOutputReal; this->NumberOfProgressActions++; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 2b0e1b1..d4ad16d 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -281,6 +281,8 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules( // Get the language to use for linking this library. std::string linkLanguage = "CUDA"; + std::string const objExt = + this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); // Create set of linking flags. std::string linkFlags; @@ -288,7 +290,7 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules( // Get the name of the device object to generate. std::string const targetOutputReal = - this->GeneratorTarget->ObjectDirectory + "cmake_device_link.o"; + this->GeneratorTarget->ObjectDirectory + "cmake_device_link" + objExt; this->DeviceLinkObject = targetOutputReal; this->NumberOfProgressActions++; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 0db5687..10ee70d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -602,10 +602,12 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement() // First and very important step is to make sure while inside this // step our link language is set to CUDA std::string cudaLinkLanguage = "CUDA"; + std::string const objExt = + this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); std::string const cfgName = this->GetConfigName(); - std::string const targetOutputReal = - ConvertToNinjaPath(genTarget.ObjectDirectory + "cmake_device_link.o"); + std::string const targetOutputReal = ConvertToNinjaPath( + genTarget.ObjectDirectory + "cmake_device_link" + objExt); std::string const targetOutputImplib = ConvertToNinjaPath(genTarget.GetFullPath(cfgName, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5443e3966190b3e4aaad445e2a406d6ac9d0d9fa commit 5443e3966190b3e4aaad445e2a406d6ac9d0d9fa Author: Brad King AuthorDate: Tue Dec 13 13:00:43 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:08:00 2016 -0500 CUDA: Detect MSVC architecture id diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index 18291b5..1ba42d9 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -6,6 +6,7 @@ set(CMAKE_CUDA_COMPILER_VERSION "@CMAKE_CUDA_COMPILER_VERSION@") set(CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT "@CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_CUDA_SIMULATE_ID "@CMAKE_CUDA_SIMULATE_ID@") set(CMAKE_CUDA_SIMULATE_VERSION "@CMAKE_CUDA_SIMULATE_VERSION@") + at SET_MSVC_CUDA_ARCHITECTURE_ID@ set(CMAKE_CUDA_COMPILER_ENV_VAR "CUDACXX") set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX") diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index e03de7e..d3024c7 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -70,6 +70,10 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) endif() include(CMakeFindBinUtils) +if(MSVC_CUDA_ARCHITECTURE_ID) + set(SET_MSVC_CUDA_ARCHITECTURE_ID + "set(MSVC_CUDA_ARCHITECTURE_ID ${MSVC_CUDA_ARCHITECTURE_ID})") +endif() #if this compiler vendor is matches NVIDIA we can determine #what the host compiler is. This only needs to be done if the CMAKE_CUDA_HOST_COMPILER diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index f506500..0e90d35 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -54,6 +54,8 @@ if(NOT MSVC_VERSION) set(_compiler_version ${CMAKE_CXX_SIMULATE_VERSION}) elseif(CMAKE_Fortran_SIMULATE_VERSION) set(_compiler_version ${CMAKE_Fortran_SIMULATE_VERSION}) + elseif(CMAKE_CUDA_SIMULATE_VERSION) + set(_compiler_version ${CMAKE_CUDA_SIMULATE_VERSION}) elseif(CMAKE_C_COMPILER_VERSION) set(_compiler_version ${CMAKE_C_COMPILER_VERSION}) else() diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 23caead..8ad2efe 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -344,7 +344,8 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const { cmMakefile* mf = this->GetMakefile(); if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") || - mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID")) { + mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID") || + mf->GetDefinition("MSVC_CUDA_ARCHITECTURE_ID")) { std::string pdbPath; std::string compilePdbPath = this->ComputeTargetCompilePDB(); if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d17683e7dfee0bc7b12afbd62e57c7d512cbc73a commit d17683e7dfee0bc7b12afbd62e57c7d512cbc73a Author: Brad King AuthorDate: Tue Dec 13 12:58:35 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:08:00 2016 -0500 CUDA: Detect use of MSVC host compiler Report it in `CMAKE_CUDA_SIMULATE_{ID,VERSION}`. diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index 8a6c0bc..18291b5 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -4,6 +4,8 @@ set(CMAKE_CUDA_HOST_LINK_LAUNCHER "@CMAKE_CUDA_HOST_LINK_LAUNCHER@") set(CMAKE_CUDA_COMPILER_ID "@CMAKE_CUDA_COMPILER_ID@") set(CMAKE_CUDA_COMPILER_VERSION "@CMAKE_CUDA_COMPILER_VERSION@") set(CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT "@CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT@") +set(CMAKE_CUDA_SIMULATE_ID "@CMAKE_CUDA_SIMULATE_ID@") +set(CMAKE_CUDA_SIMULATE_VERSION "@CMAKE_CUDA_SIMULATE_VERSION@") set(CMAKE_CUDA_COMPILER_ENV_VAR "CUDACXX") set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX") diff --git a/Modules/CMakeCUDACompilerId.cu.in b/Modules/CMakeCUDACompilerId.cu.in index a20f1b1..018bab7 100644 --- a/Modules/CMakeCUDACompilerId.cu.in +++ b/Modules/CMakeCUDACompilerId.cu.in @@ -9,6 +9,9 @@ because some compilers will just produce instructions to fill the array rather than assigning a pointer to a static array. */ char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif @CMAKE_CUDA_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CUDA_COMPILER_ID_ERROR_FOR_TEST@ @@ -35,6 +38,12 @@ int main(int argc, char* argv[]) #ifdef COMPILER_VERSION_MAJOR require += info_version[argc]; #endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif require += info_language_dialect_default[argc]; (void)argv; return require; diff --git a/Modules/Compiler/NVIDIA-DetermineCompiler.cmake b/Modules/Compiler/NVIDIA-DetermineCompiler.cmake index 32ccf8a..cb0beaf 100644 --- a/Modules/Compiler/NVIDIA-DetermineCompiler.cmake +++ b/Modules/Compiler/NVIDIA-DetermineCompiler.cmake @@ -4,4 +4,14 @@ set(_compiler_id_pp_test "defined(__NVCC__)") set(_compiler_id_version_compute " # define @PREFIX at COMPILER_VERSION_MAJOR @MACRO_DEC@(__CUDACC_VER_MAJOR__) # define @PREFIX at COMPILER_VERSION_MINOR @MACRO_DEC@(__CUDACC_VER_MINOR__) -# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@(__CUDACC_VER_BUILD__)") +# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@(__CUDACC_VER_BUILD__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define @PREFIX at SIMULATE_VERSION_MAJOR @MACRO_DEC@(_MSC_VER / 100) +# define @PREFIX at SIMULATE_VERSION_MINOR @MACRO_DEC@(_MSC_VER % 100) +# endif") + +set(_compiler_id_simulate " +# if defined(_MSC_VER) +# define @PREFIX at SIMULATE_ID \"MSVC\" +# endif") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=306c30e6007215ff4adfa9c5be28284ba8ac05ad commit 306c30e6007215ff4adfa9c5be28284ba8ac05ad Author: Brad King AuthorDate: Tue Dec 13 13:04:18 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:08:00 2016 -0500 CUDA: Allow platform files to set device linking rules Condition the default settings on the rule variables not already being set. diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index 202a7a6..cb0eef5 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -177,11 +177,14 @@ if(NOT CMAKE_CUDA_LINK_EXECUTABLE) endif() #These are used when linking relocatable (dc) cuda code -set(CMAKE_CUDA_DEVICE_LINK_LIBRARY - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") -set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") - +if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY) + set(CMAKE_CUDA_DEVICE_LINK_LIBRARY + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") +endif() +if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE) + set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") +endif() mark_as_advanced( CMAKE_CUDA_FLAGS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc5d62e4f7e190b567fd5e9f5364fa78da076ff5 commit bc5d62e4f7e190b567fd5e9f5364fa78da076ff5 Author: Brad King AuthorDate: Tue Dec 13 11:08:53 2016 -0500 Commit: Brad King CommitDate: Fri Dec 16 11:07:59 2016 -0500 CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 2031ba5..3469d34 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -45,6 +45,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj endif() list(GET args 0 cmd) endif() + set(is_msvc 0) if("${cmd}" MATCHES "${linker_regex}") string(APPEND log " link line: [${line}]\n") string(REGEX REPLACE ";-([LYz]);" ";-\\1" args "${args}") @@ -54,6 +55,17 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj string(REGEX REPLACE "^-L" "" dir "${arg}") list(APPEND implicit_dirs_tmp ${dir}) string(APPEND log " arg [${arg}] ==> dir [${dir}]\n") + elseif("${arg}" MATCHES "^[-/]LIBPATH:(.+)") + # MSVC search path. + set(dir "${CMAKE_MATCH_1}") + list(APPEND implicit_dirs_tmp ${dir}) + string(APPEND log " arg [${arg}] ==> dir [${dir}]\n") + elseif(is_msvc AND "${arg}" STREQUAL "-link") + string(APPEND log " arg [${arg}] ==> ignore MSVC cl option\n") + elseif(is_msvc AND "${arg}" MATCHES "^(.*\\.[Ll][Ii][Bb])$") + set(lib "${CMAKE_MATCH_1}") + list(APPEND implicit_libs_tmp ${lib}) + string(APPEND log " arg [${arg}] ==> lib [${lib}]\n") elseif("${arg}" MATCHES "^-l([^:].*)$") # Unix library. set(lib "${CMAKE_MATCH_1}") @@ -82,6 +94,9 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # Link editor option. list(APPEND implicit_libs_tmp ${arg}) string(APPEND log " arg [${arg}] ==> opt [${arg}]\n") + elseif("${arg}" STREQUAL "cl.exe") + string(APPEND log " arg [${arg}] ==> recognize MSVC cl\n") + set(is_msvc 1) else() string(APPEND log " arg [${arg}] ==> ignore\n") endif() diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in index 1313dbf..d6d2357 100644 --- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in +++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in @@ -518,6 +518,13 @@ set(msys_g77_libs "frtbegin;g2c;mingw32;moldname;mingwex;msvcrt;user32;kernel32; set(msys_g77_dirs "C:/some-mingw/lib/gcc/mingw32/3.4.5;C:/some-mingw/lib/gcc;/some-mingw/lib;C:/some-mingw/lib") list(APPEND platforms msys_g77) +#----------------------------------------------------------------------------- +# MSVC from NVIDIA CUDA + +set(nvcc_msvc_text [[cuda-fake-ld cl.exe -nologo "tmp/a_dlink.obj" "tmp/CMakeCUDACompilerId.obj" -link -INCREMENTAL:NO "/LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/../lib/x64" cudadevrt.lib cudart_static.lib -Fe"a.exe"]]) +set(nvcc_msvc_libs "cudadevrt.lib;cudart_static.lib") +set(nvcc_msvc_dirs "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64") +list(APPEND platforms nvcc_msvc) #----------------------------------------------------------------------------- # Test parsing for all above examples. ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCUDACompiler.cmake.in | 3 ++ Modules/CMakeCUDACompilerId.cu.in | 9 +++++ Modules/CMakeCUDAInformation.cmake | 19 ++++++---- Modules/CMakeDetermineCUDACompiler.cmake | 24 ++++++++++--- Modules/CMakeDetermineCompilerId.cmake | 1 + Modules/CMakeFindBinUtils.cmake | 1 + Modules/CMakeParseImplicitLinkInfo.cmake | 15 ++++++++ Modules/CMakeTestCUDACompiler.cmake | 5 +++ Modules/Compiler/NVIDIA-CUDA.cmake | 30 +++++++++------- Modules/Compiler/NVIDIA-DetermineCompiler.cmake | 12 ++++++- Modules/Platform/Windows-MSVC.cmake | 2 ++ Modules/Platform/Windows-NVIDIA-CUDA.cmake | 42 +++++++++++++++++++++++ Source/cmMakefileExecutableTargetGenerator.cxx | 10 +++++- Source/cmMakefileLibraryTargetGenerator.cxx | 10 +++++- Source/cmNinjaNormalTargetGenerator.cxx | 9 +++-- Source/cmNinjaTargetGenerator.cxx | 3 +- Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 7 ++++ Tests/Cuda/Complex/dynamic.cpp | 8 ++++- Tests/Cuda/Complex/dynamic.cu | 10 ++++-- Tests/Cuda/Complex/main.cpp | 10 ++++-- Tests/Cuda/Complex/mixed.cpp | 12 +++++-- Tests/Cuda/Complex/mixed.cu | 12 +++++-- Tests/CudaOnly/EnableStandard/main.cu | 8 ++++- Tests/CudaOnly/EnableStandard/shared.cu | 8 ++++- Tests/CudaOnly/SeparateCompilation/main.cu | 8 ++--- Tests/CudaOnly/WithDefs/CMakeLists.txt | 7 +++- Tests/CudaOnly/WithDefs/main.notcu | 12 +++++++ 27 files changed, 252 insertions(+), 45 deletions(-) create mode 100644 Modules/Platform/Windows-NVIDIA-CUDA.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 10:23:32 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 10:23:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1958-gae4b031 Message-ID: <20170110152332.6FBDAFA658@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ae4b031f2bcd15bb06edb97a217d8461926cc950 (commit) via c93e85d87e683e4c20e5f29726889279aea9d921 (commit) via 18c8278b622e4cb9b155c5dc4ceac93322bed85f (commit) via d47bda00b2e46b3fd6f9e050f3f21b5337ac244b (commit) via efdfc26e14b5a4d8b52a1021ffe85418cdfc802f (commit) via ad5b702c0914e0912693b9e5a84d9fe4bb53d720 (commit) via def7395f6278c096ab8f4f418cd5db5059c8c314 (commit) from 29234c055a20494f76f9653fa11df5bc7d901ebd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae4b031f2bcd15bb06edb97a217d8461926cc950 commit ae4b031f2bcd15bb06edb97a217d8461926cc950 Merge: 29234c0 c93e85d Author: Brad King AuthorDate: Tue Jan 10 10:23:30 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 10:23:30 2017 -0500 Merge topic 'vs15-detect-from-installer' into next c93e85d8 VS: Use Visual Studio Installer to locate VS 2017 18c8278b VS: Add helper class to interact with Visual Studio Installer d47bda00 VS: Fix VS 2017 Windows Store toolset selection efdfc26e VS: Drop check for VS 15 Express Edition ad5b702c VS: Port Visual Studio Setup third-party header to MinGW def7395f VS: Add Visual Studio Setup third-party header https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c93e85d87e683e4c20e5f29726889279aea9d921 commit c93e85d87e683e4c20e5f29726889279aea9d921 Author: Iyyappa Murugandi AuthorDate: Wed Dec 14 18:53:30 2016 -0800 Commit: Brad King CommitDate: Fri Dec 16 09:58:43 2016 -0500 VS: Use Visual Studio Installer to locate VS 2017 VS 2017 and later may no longer populate the Windows Registry entries CMake has traditionally used to find the VS installations. This is because VS now supports having multiple installations of the same version. The Visual Studio Installer tool provides a COM interface we can query to locate installations. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index dde6e82..e27615a 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -425,20 +425,6 @@ std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand() } } - // Search where VS15Preview places it. - mskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;"; - mskey += this->GetIDEVersion(); - if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild, - cmSystemTools::KeyWOW64_32)) { - cmSystemTools::ConvertToUnixSlashes(msbuild); - msbuild += "/MSBuild/"; - msbuild += this->GetIDEVersion(); - msbuild += "/Bin/MSBuild.exe"; - if (cmSystemTools::FileExists(msbuild, true)) { - return msbuild; - } - } - msbuild = "MSBuild.exe"; return msbuild; } diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 4299081..d11ee7c 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -8,6 +8,7 @@ #include "cmMakefile.h" #include "cmVS141CLFlagTable.h" #include "cmVS141CSharpFlagTable.h" +#include "cmVSSetupHelper.h" static const char vs15generatorName[] = "Visual Studio 15 2017"; @@ -126,21 +127,44 @@ bool cmGlobalVisualStudio15Generator::SelectWindowsStoreToolset( bool cmGlobalVisualStudio15Generator::IsWindowsDesktopToolsetInstalled() const { - const char desktop10Key[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" - "VisualStudio\\15.0\\VC\\Runtimes"; - - std::vector vc15; - return cmSystemTools::GetRegistrySubKeys(desktop10Key, vc15, - cmSystemTools::KeyWOW64_32); + return vsSetupAPIHelper.IsVS2017Installed(); } bool cmGlobalVisualStudio15Generator::IsWindowsStoreToolsetInstalled() const { - const char universal10Key[] = - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" - "VisualStudio\\15.0\\Setup\\Build Tools for Windows 10;SrcPath"; + return vsSetupAPIHelper.IsWin10SDKInstalled(); +} + +std::string cmGlobalVisualStudio15Generator::FindMSBuildCommand() +{ + std::string msbuild; + + // Ask Visual Studio Installer tool. + std::string vs; + if (vsSetupAPIHelper.GetVSInstanceInfo(vs)) { + msbuild = vs + "/MSBuild/15.0/Bin/MSBuild.exe"; + if (cmSystemTools::FileExists(msbuild)) { + return msbuild; + } + } + + msbuild = "MSBuild.exe"; + return msbuild; +} + +std::string cmGlobalVisualStudio15Generator::FindDevEnvCommand() +{ + std::string devenv; + + // Ask Visual Studio Installer tool. + std::string vs; + if (vsSetupAPIHelper.GetVSInstanceInfo(vs)) { + devenv = vs + "/Common7/IDE/devenv.com"; + if (cmSystemTools::FileExists(devenv)) { + return devenv; + } + } - std::string win10SDK; - return cmSystemTools::ReadRegistryValue(universal10Key, win10SDK, - cmSystemTools::KeyWOW64_32); + devenv = "devenv.com"; + return devenv; } diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h index 59eb11a..781b41e 100644 --- a/Source/cmGlobalVisualStudio15Generator.h +++ b/Source/cmGlobalVisualStudio15Generator.h @@ -9,6 +9,7 @@ #include #include "cmGlobalVisualStudio14Generator.h" +#include "cmVSSetupHelper.h" class cmGlobalGeneratorFactory; class cmake; @@ -39,7 +40,11 @@ protected: // of the toolset is installed bool IsWindowsStoreToolsetInstalled() const; + std::string FindMSBuildCommand() CM_OVERRIDE; + std::string FindDevEnvCommand() CM_OVERRIDE; + private: class Factory; + mutable cmVSSetupAPIHelper vsSetupAPIHelper; }; #endif diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 733e0e4..6141f50 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -64,6 +64,7 @@ #include "cmGlobalVisualStudio71Generator.h" #include "cmGlobalVisualStudio8Generator.h" #include "cmGlobalVisualStudio9Generator.h" +#include "cmVSSetupHelper.h" #define CMAKE_HAVE_VS_GENERATORS #endif @@ -1470,18 +1471,23 @@ void cmake::CreateDefaultGlobalGenerator() "\\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) { - 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; + cmVSSetupAPIHelper vsSetupAPIHelper; + if (vsSetupAPIHelper.IsVS2017Installed()) { + found = "Visual Studio 15 2017"; + } else { + 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) { + 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=18c8278b622e4cb9b155c5dc4ceac93322bed85f commit 18c8278b622e4cb9b155c5dc4ceac93322bed85f Author: Iyyappa Murugandi AuthorDate: Wed Dec 14 18:53:30 2016 -0800 Commit: Brad King CommitDate: Fri Dec 16 09:58:43 2016 -0500 VS: Add helper class to interact with Visual Studio Installer VS 2017 exports a COM component which can be queried to find if VS 2017 is installed and also other components such as VC toolset and Windows SDKs. Add a helper class to interact with this interface. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index d15fdbe..57b7b25 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -710,6 +710,8 @@ if (WIN32) cmGhsMultiTargetGenerator.h cmGhsMultiGpj.cxx cmGhsMultiGpj.h + cmVSSetupHelper.cxx + cmVSSetupHelper.h ) # Add a manifest file to executables on Windows to allow for diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx new file mode 100644 index 0000000..d675a2c --- /dev/null +++ b/Source/cmVSSetupHelper.cxx @@ -0,0 +1,395 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmVSSetupHelper.h" + +#ifndef VSSetupConstants +#define VSSetupConstants +/* clang-format off */ +const IID IID_ISetupConfiguration = { + 0x42843719, 0xDB4C, 0x46C2, + { 0x8E, 0x7C, 0x64, 0xF1, 0x81, 0x6E, 0xFD, 0x5B } +}; +const IID IID_ISetupConfiguration2 = { + 0x26AAB78C, 0x4A60, 0x49D6, + { 0xAF, 0x3B, 0x3C, 0x35, 0xBC, 0x93, 0x36, 0x5D } +}; +const IID IID_ISetupPackageReference = { + 0xda8d8a16, 0xb2b6, 0x4487, + { 0xa2, 0xf1, 0x59, 0x4c, 0xcc, 0xcd, 0x6b, 0xf5 } +}; +const IID IID_ISetupHelper = { + 0x42b21b78, 0x6192, 0x463e, + { 0x87, 0xbf, 0xd5, 0x77, 0x83, 0x8f, 0x1d, 0x5c } +}; +const IID IID_IEnumSetupInstances = { + 0x6380BCFF, 0x41D3, 0x4B2E, + { 0x8B, 0x2E, 0xBF, 0x8A, 0x68, 0x10, 0xC8, 0x48 } +}; +const IID IID_ISetupInstance2 = { + 0x89143C9A, 0x05AF, 0x49B0, + { 0xB7, 0x17, 0x72, 0xE2, 0x18, 0xA2, 0x18, 0x5C } +}; +const IID IID_ISetupInstance = { + 0xB41463C3, 0x8866, 0x43B5, + { 0xBC, 0x33, 0x2B, 0x06, 0x76, 0xF7, 0xF4, 0x2E } +}; +const CLSID CLSID_SetupConfiguration = { + 0x177F0C4A, 0x1CD3, 0x4DE7, + { 0xA3, 0x2C, 0x71, 0xDB, 0xBB, 0x9F, 0xA3, 0x6D } +}; +/* clang-format on */ +#endif + +const WCHAR* VCToolsetComponent = + L"Microsoft.VisualStudio.Component.VC.Tools.x86.x64"; +const WCHAR* Win10SDKComponent = + L"Microsoft.VisualStudio.Component.Windows10SDK"; +const WCHAR* Win81SDKComponent = + L"Microsoft.VisualStudio.Component.Windows81SDK"; +const WCHAR* ComponentType = L"Component"; + +cmVSSetupAPIHelper::cmVSSetupAPIHelper() + : setupConfig(NULL) + , setupConfig2(NULL) + , setupHelper(NULL) + , initializationFailure(false) +{ + comInitialized = CoInitializeEx(NULL, 0); + if (SUCCEEDED(comInitialized)) { + Initialize(); + } else { + initializationFailure = true; + } +} + +cmVSSetupAPIHelper::~cmVSSetupAPIHelper() +{ + setupHelper = NULL; + setupConfig2 = NULL; + setupConfig = NULL; + if (SUCCEEDED(comInitialized)) + CoUninitialize(); +} + +bool cmVSSetupAPIHelper::IsVS2017Installed() +{ + bool ret = false; + if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { + ret = EnumerateAndChooseVSInstance(); + } + + return ret; +} + +bool cmVSSetupAPIHelper::IsWin10SDKInstalled() +{ + bool isWin10SDKInstalled = false; + if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { + if (EnumerateAndChooseVSInstance() && + chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { + isWin10SDKInstalled = chosenInstanceInfo.IsWin10SDKInstalled; + } + } else { + isWin10SDKInstalled = chosenInstanceInfo.IsWin10SDKInstalled; + } + + return isWin10SDKInstalled; +} + +bool cmVSSetupAPIHelper::IsWin81SDKInstalled() +{ + bool isWin81SDKInstalled = false; + if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { + if (EnumerateAndChooseVSInstance() && + chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { + isWin81SDKInstalled = chosenInstanceInfo.IsWin81SDKInstalled; + } + } else { + isWin81SDKInstalled = chosenInstanceInfo.IsWin81SDKInstalled; + } + + return isWin81SDKInstalled; +} + +bool cmVSSetupAPIHelper::CheckInstalledComponent( + SmartCOMPtr package, bool& bVCToolset, + bool& bWin10SDK, bool& bWin81SDK) +{ + bool ret = false; + bVCToolset = bWin10SDK = bWin81SDK = false; + SmartBSTR bstrId; + if (FAILED(package->GetId(&bstrId))) { + return ret; + } + + SmartBSTR bstrType; + if (FAILED(package->GetType(&bstrType))) { + return ret; + } + + std::wstring id = std::wstring(bstrId); + std::wstring type = std::wstring(bstrType); + if (id.compare(VCToolsetComponent) == 0 && + type.compare(ComponentType) == 0) { + bVCToolset = true; + ret = true; + } + + // Checks for any version of Win10 SDK. The version is appended at the end of + // the + // component name ex: Microsoft.VisualStudio.Component.Windows10SDK.10240 + if (id.find(Win10SDKComponent) != std::wstring::npos && + type.compare(ComponentType) == 0) { + bWin10SDK = true; + ret = true; + } + + if (id.compare(Win81SDKComponent) == 0 && type.compare(ComponentType) == 0) { + bWin81SDK = true; + ret = true; + } + + return ret; +} + +// Gather additional info such as if VCToolset, WinSDKs are installed, location +// of VS and version information. +bool cmVSSetupAPIHelper::GetVSInstanceInfo( + SmartCOMPtr pInstance, VSInstanceInfo& vsInstanceInfo) +{ + bool isVCToolSetInstalled = false; + if (pInstance == NULL) + return false; + + SmartBSTR bstrId; + if (SUCCEEDED(pInstance->GetInstanceId(&bstrId))) { + vsInstanceInfo.InstanceId = std::wstring(bstrId); + } else { + return false; + } + + InstanceState state; + if (FAILED(pInstance->GetState(&state))) { + return false; + } + + ULONGLONG ullVersion = 0; + SmartBSTR bstrVersion; + if (FAILED(pInstance->GetInstallationVersion(&bstrVersion))) { + return false; + } else { + vsInstanceInfo.Version = std::wstring(bstrVersion); + if (FAILED(setupHelper->ParseVersion(bstrVersion, &ullVersion))) { + vsInstanceInfo.ullVersion = 0; + } else { + vsInstanceInfo.ullVersion = ullVersion; + } + } + + // Reboot may have been required before the installation path was created. + SmartBSTR bstrInstallationPath; + if ((eLocal & state) == eLocal) { + if (FAILED(pInstance->GetInstallationPath(&bstrInstallationPath))) { + return false; + } else { + vsInstanceInfo.VSInstallLocation = std::wstring(bstrInstallationPath); + } + } + + // Reboot may have been required before the product package was registered + // (last). + if ((eRegistered & state) == eRegistered) { + SmartCOMPtr product; + if (FAILED(pInstance->GetProduct(&product)) || !product) { + return false; + } + + LPSAFEARRAY lpsaPackages; + if (FAILED(pInstance->GetPackages(&lpsaPackages)) || + lpsaPackages == NULL) { + return false; + } + + int lower = lpsaPackages->rgsabound[0].lLbound; + int upper = lpsaPackages->rgsabound[0].cElements + lower; + + IUnknown** ppData = (IUnknown**)lpsaPackages->pvData; + for (int i = lower; i < upper; i++) { + SmartCOMPtr package = NULL; + if (FAILED(ppData[i]->QueryInterface(IID_ISetupPackageReference, + (void**)&package)) || + package == NULL) + continue; + + bool vcToolsetInstalled = false, win10SDKInstalled = false, + win81SDkInstalled = false; + bool ret = CheckInstalledComponent(package, vcToolsetInstalled, + win10SDKInstalled, win81SDkInstalled); + if (ret) { + isVCToolSetInstalled |= vcToolsetInstalled; + vsInstanceInfo.IsWin10SDKInstalled |= win10SDKInstalled; + vsInstanceInfo.IsWin81SDKInstalled |= win81SDkInstalled; + } + } + + SafeArrayDestroy(lpsaPackages); + } + + return isVCToolSetInstalled; +} + +bool cmVSSetupAPIHelper::GetVSInstanceInfo(std::string& vsInstallLocation) +{ + vsInstallLocation = ""; + bool isInstalled = false; + + if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { + isInstalled = EnumerateAndChooseVSInstance(); + } + + // Enumerate and choose best VS instance + if (chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { + std::string str(chosenInstanceInfo.VSInstallLocation.begin(), + chosenInstanceInfo.VSInstallLocation.end()); + vsInstallLocation = str; + isInstalled = true; + } + + return isInstalled; +} + +bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance() +{ + bool isVSInstanceExists = false; + if (chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { + return true; + } + + if (initializationFailure || setupConfig == NULL || setupConfig2 == NULL || + setupHelper == NULL) + return false; + + std::vector vecVSInstances; + SmartCOMPtr enumInstances = NULL; + if (FAILED( + setupConfig2->EnumInstances((IEnumSetupInstances**)&enumInstances)) || + !enumInstances) { + return false; + } + + SmartCOMPtr instance; + while (SUCCEEDED(enumInstances->Next(1, &instance, NULL)) && instance) { + SmartCOMPtr instance2 = NULL; + if (FAILED( + instance->QueryInterface(IID_ISetupInstance2, (void**)&instance2)) || + !instance2) { + instance = NULL; + continue; + } + + VSInstanceInfo instanceInfo; + bool isInstalled = GetVSInstanceInfo(instance2, instanceInfo); + instance = instance2 = NULL; + + if (isInstalled) { + vecVSInstances.push_back(instanceInfo); + } + } + + if (vecVSInstances.size() > 0) { + isVSInstanceExists = true; + int index = ChooseVSInstance(vecVSInstances); + chosenInstanceInfo = vecVSInstances[index]; + } + + return isVSInstanceExists; +} + +int cmVSSetupAPIHelper::ChooseVSInstance( + const std::vector& vecVSInstances) +{ + if (vecVSInstances.size() == 0) + return -1; + + if (vecVSInstances.size() == 1) + return 0; + + unsigned int chosenIndex = 0; + for (unsigned int i = 1; i < vecVSInstances.size(); i++) { + // If the current has Win10 SDK but not the chosen one, then choose the + // current VS instance + if (!vecVSInstances[chosenIndex].IsWin10SDKInstalled && + vecVSInstances[i].IsWin10SDKInstalled) { + chosenIndex = i; + continue; + } + + // If the chosen one has Win10 SDK but the current one is not, then look at + // the next VS instance even the current + // instance version may be higher + if (vecVSInstances[chosenIndex].IsWin10SDKInstalled && + !vecVSInstances[i].IsWin10SDKInstalled) { + continue; + } + + // If both chosen one and current one doesn't have Win10 SDK but the + // current one has Win8.1 SDK installed, + // then choose the current one + if (!vecVSInstances[chosenIndex].IsWin10SDKInstalled && + !vecVSInstances[i].IsWin10SDKInstalled && + !vecVSInstances[chosenIndex].IsWin81SDKInstalled && + vecVSInstances[i].IsWin81SDKInstalled) { + chosenIndex = i; + continue; + } + + // If there is no difference in WinSDKs then look for the highest version + // of installed VS + if ((vecVSInstances[chosenIndex].IsWin10SDKInstalled == + vecVSInstances[i].IsWin10SDKInstalled) && + (vecVSInstances[chosenIndex].IsWin81SDKInstalled == + vecVSInstances[i].IsWin81SDKInstalled) && + vecVSInstances[chosenIndex].Version < vecVSInstances[i].Version) { + chosenIndex = i; + continue; + } + } + + return chosenIndex; +} + +bool cmVSSetupAPIHelper::Initialize() +{ + if (initializationFailure) + return false; + + if (FAILED(comInitialized)) { + initializationFailure = true; + return false; + } + + if (FAILED(setupConfig.CoCreateInstance(CLSID_SetupConfiguration, NULL, + IID_ISetupConfiguration, + CLSCTX_INPROC_SERVER)) || + setupConfig == NULL) { + initializationFailure = true; + return false; + } + + if (FAILED(setupConfig.QueryInterface(IID_ISetupConfiguration2, + (void**)&setupConfig2)) || + setupConfig2 == NULL) { + initializationFailure = true; + return false; + } + + if (FAILED( + setupConfig.QueryInterface(IID_ISetupHelper, (void**)&setupHelper)) || + setupHelper == NULL) { + initializationFailure = true; + return false; + } + + initializationFailure = false; + return true; +} diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h new file mode 100644 index 0000000..d2f514c --- /dev/null +++ b/Source/cmVSSetupHelper.h @@ -0,0 +1,154 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmVSSetupHelper_h +#define cmVSSetupHelper_h + +#ifndef NOMINMAX +#define NOMINMAX // Undefine min and max defined by windows.h +#endif + +// Published by Visual Studio Setup team +#include "cmvssetup/Setup.Configuration.h" + +#include +#include + +#include + +template +class SmartCOMPtr +{ +public: + SmartCOMPtr() { ptr = NULL; } + SmartCOMPtr(T* p) + { + ptr = p; + if (ptr != NULL) + ptr->AddRef(); + } + SmartCOMPtr(const SmartCOMPtr& sptr) + { + ptr = sptr.ptr; + if (ptr != NULL) + ptr->AddRef(); + } + T** operator&() { return &ptr; } + T* operator->() { return ptr; } + T* operator=(T* p) + { + if (*this != p) { + ptr = p; + if (ptr != NULL) + ptr->AddRef(); + } + return *this; + } + operator T*() const { return ptr; } + template + HRESULT QueryInterface(REFCLSID rclsid, I** pp) + { + if (pp != NULL) { + return ptr->QueryInterface(rclsid, (void**)pp); + } else { + return E_FAIL; + } + } + HRESULT CoCreateInstance(REFCLSID clsid, IUnknown* pUnknown, + REFIID interfaceId, DWORD dwClsContext = CLSCTX_ALL) + { + HRESULT hr = ::CoCreateInstance(clsid, pUnknown, dwClsContext, interfaceId, + (void**)&ptr); + return hr; + } + ~SmartCOMPtr() + { + if (ptr != NULL) + ptr->Release(); + } + +private: + T* ptr; +}; + +class SmartBSTR +{ +public: + SmartBSTR() { str = NULL; } + SmartBSTR(const SmartBSTR& src) + { + if (src.str != NULL) { + str = ::SysAllocStringByteLen((char*)str, ::SysStringByteLen(str)); + } else { + str = ::SysAllocStringByteLen(NULL, 0); + } + } + SmartBSTR& operator=(const SmartBSTR& src) + { + if (str != src.str) { + ::SysFreeString(str); + if (src.str != NULL) { + str = ::SysAllocStringByteLen((char*)str, ::SysStringByteLen(str)); + } else { + str = ::SysAllocStringByteLen(NULL, 0); + } + } + return *this; + } + operator BSTR() const { return str; } + BSTR* operator&() throw() { return &str; } + ~SmartBSTR() throw() { ::SysFreeString(str); } +private: + BSTR str; +}; + +struct VSInstanceInfo +{ + std::wstring InstanceId; + std::wstring VSInstallLocation; + std::wstring Version; + ULONGLONG ullVersion; + bool IsWin10SDKInstalled; + bool IsWin81SDKInstalled; + + VSInstanceInfo() + { + InstanceId = VSInstallLocation = Version = L""; + ullVersion = 0; + IsWin10SDKInstalled = IsWin81SDKInstalled = false; + } +}; + +class cmVSSetupAPIHelper +{ +public: + cmVSSetupAPIHelper(); + ~cmVSSetupAPIHelper(); + + bool IsVS2017Installed(); + bool GetVSInstanceInfo(std::string& vsInstallLocation); + bool IsWin10SDKInstalled(); + bool IsWin81SDKInstalled(); + +private: + bool Initialize(); + bool GetVSInstanceInfo(SmartCOMPtr instance2, + VSInstanceInfo& vsInstanceInfo); + bool CheckInstalledComponent(SmartCOMPtr package, + bool& bVCToolset, bool& bWin10SDK, + bool& bWin81SDK); + int ChooseVSInstance(const std::vector& vecVSInstances); + bool EnumerateAndChooseVSInstance(); + + // COM ptrs to query about VS instances + SmartCOMPtr setupConfig; + SmartCOMPtr setupConfig2; + SmartCOMPtr setupHelper; + // used to indicate failure in Initialize(), so we don't have to call again + bool initializationFailure; + // indicated if COM initialization is successful + HRESULT comInitialized; + // current best instance of VS selected + VSInstanceInfo chosenInstanceInfo; +}; + +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d47bda00b2e46b3fd6f9e050f3f21b5337ac244b commit d47bda00b2e46b3fd6f9e050f3f21b5337ac244b Author: Iyyappa Murugandi AuthorDate: Wed Dec 14 18:53:30 2016 -0800 Commit: Brad King CommitDate: Fri Dec 16 09:58:31 2016 -0500 VS: Fix VS 2017 Windows Store toolset selection VS 2017 uses the `v141` toolset, not `v140`. diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index fe4b91c..4299081 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -114,7 +114,7 @@ bool cmGlobalVisualStudio15Generator::SelectWindowsStoreToolset( if (cmHasLiteralPrefix(this->SystemVersion, "10.0")) { if (this->IsWindowsStoreToolsetInstalled() && this->IsWindowsDesktopToolsetInstalled()) { - toolset = "v140"; // VS 15 uses v140 toolset + toolset = "v141"; // VS 15 uses v141 toolset return true; } else { return false; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efdfc26e14b5a4d8b52a1021ffe85418cdfc802f commit efdfc26e14b5a4d8b52a1021ffe85418cdfc802f Author: Iyyappa Murugandi AuthorDate: Wed Dec 14 18:53:30 2016 -0800 Commit: Brad King CommitDate: Fri Dec 16 09:58:31 2016 -0500 VS: Drop check for VS 15 Express Edition There is no such version of VS 2017. diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 20d30bc..fe4b91c 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -80,11 +80,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( cmake* cm, const std::string& name, const std::string& platformName) : cmGlobalVisualStudio14Generator(cm, name, platformName) { - std::string vc15Express; - this->ExpressEdition = cmSystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\15.0\\Setup\\VC;" - "ProductDir", - vc15Express, cmSystemTools::KeyWOW64_32); + this->ExpressEdition = false; this->DefaultPlatformToolset = "v141"; this->DefaultClFlagTable = cmVS141CLFlagTable; this->DefaultCSharpFlagTable = cmVS141CSharpFlagTable; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad5b702c0914e0912693b9e5a84d9fe4bb53d720 commit ad5b702c0914e0912693b9e5a84d9fe4bb53d720 Author: Iyyappa Murugandi AuthorDate: Thu Dec 15 16:38:51 2016 -0800 Commit: Brad King CommitDate: Fri Dec 16 09:58:31 2016 -0500 VS: Port Visual Studio Setup third-party header to MinGW The `Setup.Configuration.h` which is released by Microsoft is specific to MSVC. Update it to compile with non-MS toolchains like MinGW. diff --git a/Utilities/cmvssetup/Setup.Configuration.h b/Utilities/cmvssetup/Setup.Configuration.h index ef26119..cc01d27 100644 --- a/Utilities/cmvssetup/Setup.Configuration.h +++ b/Utilities/cmvssetup/Setup.Configuration.h @@ -8,6 +8,7 @@ #ifndef SetupConfiguration_h #define SetupConfiguration_h + #include // Constants @@ -20,6 +21,8 @@ #define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) #endif +#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) + // Enumerations // /// @@ -482,4 +485,494 @@ STDMETHODIMP GetSetupConfiguration( #ifdef __cplusplus } #endif + +#else + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#define VS_SETUP_GCC_DIAGNOSTIC_PUSHED +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +#endif + +#ifndef MAXUINT +#define MAXUINT ((UINT)~((UINT)0)) +#endif + +#ifndef DECLSPEC_NOVTABLE +#if (_MSC_VER >= 1100) && defined(__cplusplus) +#define DECLSPEC_NOVTABLE __declspec(novtable) +#else +#define DECLSPEC_NOVTABLE +#endif +#endif + +// Enumerations +// +/// +/// The state of an instance. +/// +enum InstanceState +{ + /// + /// The instance state has not been determined. + /// + eNone = 0, + + /// + /// The instance installation path exists. + /// + eLocal = 1, + + /// + /// A product is registered to the instance. + /// + eRegistered = 2, + + /// + /// No reboot is required for the instance. + /// + eNoRebootRequired = 4, + + /// + /// The instance represents a complete install. + /// + eComplete = MAXUINT, +}; + +// Forward interface declarations +// +#ifndef __ISetupInstance_FWD_DEFINED__ +#define __ISetupInstance_FWD_DEFINED__ +typedef struct ISetupInstance ISetupInstance; +#endif + +#ifndef __ISetupInstance2_FWD_DEFINED__ +#define __ISetupInstance2_FWD_DEFINED__ +typedef struct ISetupInstance2 ISetupInstance2; +#endif + +#ifndef __IEnumSetupInstances_FWD_DEFINED__ +#define __IEnumSetupInstances_FWD_DEFINED__ +typedef struct IEnumSetupInstances IEnumSetupInstances; +#endif + +#ifndef __ISetupConfiguration_FWD_DEFINED__ +#define __ISetupConfiguration_FWD_DEFINED__ +typedef struct ISetupConfiguration ISetupConfiguration; +#endif + +#ifndef __ISetupConfiguration2_FWD_DEFINED__ +#define __ISetupConfiguration2_FWD_DEFINED__ +typedef struct ISetupConfiguration2 ISetupConfiguration2; +#endif + +#ifndef __ISetupPackageReference_FWD_DEFINED__ +#define __ISetupPackageReference_FWD_DEFINED__ +typedef struct ISetupPackageReference ISetupPackageReference; +#endif + +#ifndef __ISetupHelper_FWD_DEFINED__ +#define __ISetupHelper_FWD_DEFINED__ +typedef struct ISetupHelper ISetupHelper; +#endif + +// Forward class declarations +// +#ifndef __SetupConfiguration_FWD_DEFINED__ +#define __SetupConfiguration_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SetupConfiguration SetupConfiguration; +#endif + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + // Interface definitions + // + EXTERN_C const IID IID_ISetupInstance; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// Information about an instance of a product. + /// + struct DECLSPEC_UUID("B41463C3-8866-43B5-BC33-2B0676F7F42E") DECLSPEC_NOVTABLE ISetupInstance : public IUnknown + { + /// + /// Gets the instance identifier (should match the name of the parent instance directory). + /// + /// The instance identifier. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetInstanceId)( + BSTR* pbstrInstanceId + ) = 0; + + /// + /// Gets the local date and time when the installation was originally installed. + /// + /// The local date and time when the installation was originally installed. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallDate)( + LPFILETIME pInstallDate + ) = 0; + + /// + /// Gets the unique name of the installation, often indicating the branch and other information used for telemetry. + /// + /// The unique name of the installation, often indicating the branch and other information used for telemetry. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationName)( + BSTR* pbstrInstallationName + ) = 0; + + /// + /// Gets the path to the installation root of the product. + /// + /// The path to the installation root of the product. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationPath)( + BSTR* pbstrInstallationPath + ) = 0; + + /// + /// Gets the version of the product installed in this instance. + /// + /// The version of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationVersion)( + BSTR* pbstrInstallationVersion + ) = 0; + + /// + /// Gets the display name (title) of the product installed in this instance. + /// + /// The LCID for the display name. + /// The display name (title) of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetDisplayName)( + LCID lcid, + BSTR* pbstrDisplayName + ) = 0; + + /// + /// Gets the description of the product installed in this instance. + /// + /// The LCID for the description. + /// The description of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetDescription)( + LCID lcid, + BSTR* pbstrDescription + ) = 0; + + /// + /// Resolves the optional relative path to the root path of the instance. + /// + /// A relative path within the instance to resolve, or NULL to get the root path. + /// The full path to the optional relative path within the instance. If the relative path is NULL, the root path will always terminate in a backslash. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(ResolvePath)( + LPCOLESTR pwszRelativePath, + BSTR* pbstrAbsolutePath + ) = 0; + }; +#endif + + EXTERN_C const IID IID_ISetupInstance2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// Information about an instance of a product. + /// + struct DECLSPEC_UUID("89143C9A-05AF-49B0-B717-72E218A2185C") DECLSPEC_NOVTABLE ISetupInstance2 : public ISetupInstance + { + /// + /// Gets the state of the instance. + /// + /// The state of the instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetState)( + InstanceState* pState + ) = 0; + + /// + /// Gets an array of package references registered to the instance. + /// + /// Pointer to an array of . + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined. + STDMETHOD(GetPackages)( + LPSAFEARRAY* ppsaPackages + ) = 0; + + /// + /// Gets a pointer to the that represents the registered product. + /// + /// Pointer to an instance of . This may be NULL if does not return . + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined. + STDMETHOD(GetProduct)( + ISetupPackageReference** ppPackage + ) = 0; + + /// + /// Gets the relative path to the product application, if available. + /// + /// The relative path to the product application, if available. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetProductPath)( + BSTR* pbstrProductPath + ) = 0; + }; +#endif + + EXTERN_C const IID IID_IEnumSetupInstances; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// A enumerator of installed objects. + /// + struct DECLSPEC_UUID("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848") DECLSPEC_NOVTABLE IEnumSetupInstances : public IUnknown + { + /// + /// Retrieves the next set of product instances in the enumeration sequence. + /// + /// The number of product instances to retrieve. + /// A pointer to an array of . + /// A pointer to the number of product instances retrieved. If celt is 1 this parameter may be NULL. + /// S_OK if the number of elements were fetched, S_FALSE if nothing was fetched (at end of enumeration), E_INVALIDARG if celt is greater than 1 and pceltFetched is NULL, or E_OUTOFMEMORY if an could not be allocated. + STDMETHOD(Next)( + ULONG celt, + ISetupInstance** rgelt, + ULONG* pceltFetched + ) = 0; + + /// + /// Skips the next set of product instances in the enumeration sequence. + /// + /// The number of product instances to skip. + /// S_OK if the number of elements could be skipped; otherwise, S_FALSE; + STDMETHOD(Skip)( + ULONG celt + ) = 0; + + /// + /// Resets the enumeration sequence to the beginning. + /// + /// Always returns S_OK; + STDMETHOD(Reset)(void) = 0; + + /// + /// Creates a new enumeration object in the same state as the current enumeration object: the new object points to the same place in the enumeration sequence. + /// + /// A pointer to a pointer to a new interface. If the method fails, this parameter is undefined. + /// S_OK if a clone was returned; otherwise, E_OUTOFMEMORY. + STDMETHOD(Clone)( + IEnumSetupInstances** ppenum + ) = 0; + }; +#endif + + EXTERN_C const IID IID_ISetupConfiguration; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// Gets information about product instances set up on the machine. + /// + struct DECLSPEC_UUID("42843719-DB4C-46C2-8E7C-64F1816EFD5B") DECLSPEC_NOVTABLE ISetupConfiguration : public IUnknown + { + /// + /// Enumerates all completed product instances installed. + /// + /// An enumeration of completed, installed product instances. + /// Standard HRESULT indicating success or failure. + STDMETHOD(EnumInstances)( + IEnumSetupInstances** ppEnumInstances + ) = 0; + + /// + /// Gets the instance for the current process path. + /// + /// The instance for the current process path. + /// The instance for the current process path, or E_NOTFOUND if not found. + STDMETHOD(GetInstanceForCurrentProcess)( + ISetupInstance** ppInstance + ) = 0; + + /// + /// Gets the instance for the given path. + /// + /// The instance for the given path. + /// The instance for the given path, or E_NOTFOUND if not found. + STDMETHOD(GetInstanceForPath)( + LPCWSTR wzPath, + ISetupInstance** ppInstance + ) = 0; + }; +#endif + + EXTERN_C const IID IID_ISetupConfiguration2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// Gets information about product instances. + /// + struct DECLSPEC_UUID("26AAB78C-4A60-49D6-AF3B-3C35BC93365D") DECLSPEC_NOVTABLE ISetupConfiguration2 : public ISetupConfiguration + { + /// + /// Enumerates all product instances. + /// + /// An enumeration of all product instances. + /// Standard HRESULT indicating success or failure. + STDMETHOD(EnumAllInstances)( + IEnumSetupInstances** ppEnumInstances + ) = 0; + }; +#endif + + EXTERN_C const IID IID_ISetupPackageReference; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// A reference to a package. + /// + struct DECLSPEC_UUID("da8d8a16-b2b6-4487-a2f1-594ccccd6bf5") DECLSPEC_NOVTABLE ISetupPackageReference : public IUnknown + { + /// + /// Gets the general package identifier. + /// + /// The general package identifier. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetId)( + BSTR* pbstrId + ) = 0; + + /// + /// Gets the version of the package. + /// + /// The version of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetVersion)( + BSTR* pbstrVersion + ) = 0; + + /// + /// Gets the target process architecture of the package. + /// + /// The target process architecture of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetChip)( + BSTR* pbstrChip + ) = 0; + + /// + /// Gets the language and optional region identifier. + /// + /// The language and optional region identifier. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetLanguage)( + BSTR* pbstrLanguage + ) = 0; + + /// + /// Gets the build branch of the package. + /// + /// The build branch of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetBranch)( + BSTR* pbstrBranch + ) = 0; + + /// + /// Gets the type of the package. + /// + /// The type of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetType)( + BSTR* pbstrType + ) = 0; + + /// + /// Gets the unique identifier consisting of all defined tokens. + /// + /// The unique identifier consisting of all defined tokens. + /// Standard HRESULT indicating success or failure, including E_UNEXPECTED if no Id was defined (required). + STDMETHOD(GetUniqueId)( + BSTR* pbstrUniqueId + ) = 0; + }; +#endif + + EXTERN_C const IID IID_ISetupHelper; + +#if defined(__cplusplus) && !defined(CINTERFACE) + /// + /// Helper functions. + /// + /// + /// You can query for this interface from the class. + /// + struct DECLSPEC_UUID("42b21b78-6192-463e-87bf-d577838f1d5c") DECLSPEC_NOVTABLE ISetupHelper : public IUnknown + { + /// + /// Parses a dotted quad version string into a 64-bit unsigned integer. + /// + /// The dotted quad version string to parse, e.g. 1.2.3.4. + /// A 64-bit unsigned integer representing the version. You can compare this to other versions. + /// Standard HRESULT indicating success or failure. + STDMETHOD(ParseVersion)( + LPCOLESTR pwszVersion, + PULONGLONG pullVersion + ) = 0; + + /// + /// Parses a dotted quad version string into a 64-bit unsigned integer. + /// + /// The string containing 1 or 2 dotted quad version strings to parse, e.g. [1.0,) that means 1.0.0.0 or newer. + /// A 64-bit unsigned integer representing the minimum version, which may be 0. You can compare this to other versions. + /// A 64-bit unsigned integer representing the maximum version, which may be MAXULONGLONG. You can compare this to other versions. + /// Standard HRESULT indicating success or failure. + STDMETHOD(ParseVersionRange)( + LPCOLESTR pwszVersionRange, + PULONGLONG pullMinVersion, + PULONGLONG pullMaxVersion + ) = 0; + }; +#endif + + // Class declarations + // + EXTERN_C const CLSID CLSID_SetupConfiguration; + +#ifdef __cplusplus + /// + /// This class implements , , and . + /// + class DECLSPEC_UUID("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D") SetupConfiguration; +#endif + + // Function declarations + // + /// + /// Gets an that provides information about product instances installed on the machine. + /// + /// The that provides information about product instances installed on the machine. + /// Reserved for future use. + /// Standard HRESULT indicating success or failure. + STDMETHODIMP GetSetupConfiguration( + ISetupConfiguration** ppConfiguration, + LPVOID pReserved + ); + +#ifdef __cplusplus +} +#endif + +#ifdef VS_SETUP_GCC_DIAGNOSTIC_PUSHED +#pragma GCC diagnostic pop +#undef VS_SETUP_GCC_DIAGNOSTIC_PUSHED +#endif + +#endif #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=def7395f6278c096ab8f4f418cd5db5059c8c314 commit def7395f6278c096ab8f4f418cd5db5059c8c314 Author: Iyyappa Murugandi AuthorDate: Wed Dec 14 18:53:30 2016 -0800 Commit: Brad King CommitDate: Fri Dec 16 09:43:10 2016 -0500 VS: Add Visual Studio Setup third-party header The Visual Studio Setup team releases a `Setup.Configuration.h` header under the MIT License for use by external applications to interact with the Visual Studio Installer tool [1]. Import it into our source tree for use by CMake. [1] https://github.com/microsoft/vs-setup-samples diff --git a/Utilities/cmvssetup/.gitattributes b/Utilities/cmvssetup/.gitattributes new file mode 100644 index 0000000..562b12e --- /dev/null +++ b/Utilities/cmvssetup/.gitattributes @@ -0,0 +1 @@ +* -whitespace diff --git a/Utilities/cmvssetup/Setup.Configuration.h b/Utilities/cmvssetup/Setup.Configuration.h new file mode 100644 index 0000000..ef26119 --- /dev/null +++ b/Utilities/cmvssetup/Setup.Configuration.h @@ -0,0 +1,485 @@ +// +// Copyright (C) Microsoft Corporation. All rights reserved. +// + +// This file is licensed under "The MIT License(MIT)". +// This file is released by Visual Studio setup team for consumption by external applications. +// For more information please look at this git repo https://github.com/microsoft/vs-setup-samples + +#ifndef SetupConfiguration_h +#define SetupConfiguration_h +#include + +// Constants +// +#ifndef E_NOTFOUND +#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND) +#endif + +#ifndef E_FILENOTFOUND +#define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) +#endif + +// Enumerations +// +/// +/// The state of an instance. +/// +enum InstanceState +{ + /// + /// The instance state has not been determined. + /// + eNone = 0, + + /// + /// The instance installation path exists. + /// + eLocal = 1, + + /// + /// A product is registered to the instance. + /// + eRegistered = 2, + + /// + /// No reboot is required for the instance. + /// + eNoRebootRequired = 4, + + /// + /// The instance represents a complete install. + /// + eComplete = MAXUINT, +}; + +// Forward interface declarations +// +#ifndef __ISetupInstance_FWD_DEFINED__ +#define __ISetupInstance_FWD_DEFINED__ +typedef struct ISetupInstance ISetupInstance; +#endif + +#ifndef __ISetupInstance2_FWD_DEFINED__ +#define __ISetupInstance2_FWD_DEFINED__ +typedef struct ISetupInstance2 ISetupInstance2; +#endif + +#ifndef __IEnumSetupInstances_FWD_DEFINED__ +#define __IEnumSetupInstances_FWD_DEFINED__ +typedef struct IEnumSetupInstances IEnumSetupInstances; +#endif + +#ifndef __ISetupConfiguration_FWD_DEFINED__ +#define __ISetupConfiguration_FWD_DEFINED__ +typedef struct ISetupConfiguration ISetupConfiguration; +#endif + +#ifndef __ISetupConfiguration2_FWD_DEFINED__ +#define __ISetupConfiguration2_FWD_DEFINED__ +typedef struct ISetupConfiguration2 ISetupConfiguration2; +#endif + +#ifndef __ISetupPackageReference_FWD_DEFINED__ +#define __ISetupPackageReference_FWD_DEFINED__ +typedef struct ISetupPackageReference ISetupPackageReference; +#endif + +#ifndef __ISetupHelper_FWD_DEFINED__ +#define __ISetupHelper_FWD_DEFINED__ +typedef struct ISetupHelper ISetupHelper; +#endif + +// Forward class declarations +// +#ifndef __SetupConfiguration_FWD_DEFINED__ +#define __SetupConfiguration_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SetupConfiguration SetupConfiguration; +#endif + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// Interface definitions +// +EXTERN_C const IID IID_ISetupInstance; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Information about an instance of a product. +/// +struct DECLSPEC_UUID("B41463C3-8866-43B5-BC33-2B0676F7F42E") DECLSPEC_NOVTABLE ISetupInstance : public IUnknown +{ + /// + /// Gets the instance identifier (should match the name of the parent instance directory). + /// + /// The instance identifier. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetInstanceId)( + _Out_ BSTR* pbstrInstanceId + ) = 0; + + /// + /// Gets the local date and time when the installation was originally installed. + /// + /// The local date and time when the installation was originally installed. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallDate)( + _Out_ LPFILETIME pInstallDate + ) = 0; + + /// + /// Gets the unique name of the installation, often indicating the branch and other information used for telemetry. + /// + /// The unique name of the installation, often indicating the branch and other information used for telemetry. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationName)( + _Out_ BSTR* pbstrInstallationName + ) = 0; + + /// + /// Gets the path to the installation root of the product. + /// + /// The path to the installation root of the product. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationPath)( + _Out_ BSTR* pbstrInstallationPath + ) = 0; + + /// + /// Gets the version of the product installed in this instance. + /// + /// The version of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetInstallationVersion)( + _Out_ BSTR* pbstrInstallationVersion + ) = 0; + + /// + /// Gets the display name (title) of the product installed in this instance. + /// + /// The LCID for the display name. + /// The display name (title) of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetDisplayName)( + _In_ LCID lcid, + _Out_ BSTR* pbstrDisplayName + ) = 0; + + /// + /// Gets the description of the product installed in this instance. + /// + /// The LCID for the description. + /// The description of the product installed in this instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(GetDescription)( + _In_ LCID lcid, + _Out_ BSTR* pbstrDescription + ) = 0; + + /// + /// Resolves the optional relative path to the root path of the instance. + /// + /// A relative path within the instance to resolve, or NULL to get the root path. + /// The full path to the optional relative path within the instance. If the relative path is NULL, the root path will always terminate in a backslash. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the property is not defined. + STDMETHOD(ResolvePath)( + _In_opt_z_ LPCOLESTR pwszRelativePath, + _Out_ BSTR* pbstrAbsolutePath + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupInstance2; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Information about an instance of a product. +/// +struct DECLSPEC_UUID("89143C9A-05AF-49B0-B717-72E218A2185C") DECLSPEC_NOVTABLE ISetupInstance2 : public ISetupInstance +{ + /// + /// Gets the state of the instance. + /// + /// The state of the instance. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetState)( + _Out_ InstanceState* pState + ) = 0; + + /// + /// Gets an array of package references registered to the instance. + /// + /// Pointer to an array of . + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined. + STDMETHOD(GetPackages)( + _Out_ LPSAFEARRAY* ppsaPackages + ) = 0; + + /// + /// Gets a pointer to the that represents the registered product. + /// + /// Pointer to an instance of . This may be NULL if does not return . + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist and E_NOTFOUND if the packages property is not defined. + STDMETHOD(GetProduct)( + _Outptr_result_maybenull_ ISetupPackageReference** ppPackage + ) = 0; + + /// + /// Gets the relative path to the product application, if available. + /// + /// The relative path to the product application, if available. + /// Standard HRESULT indicating success or failure, including E_FILENOTFOUND if the instance state does not exist. + STDMETHOD(GetProductPath)( + _Outptr_result_maybenull_ BSTR* pbstrProductPath + ) = 0; +}; +#endif + +EXTERN_C const IID IID_IEnumSetupInstances; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// A enumerator of installed objects. +/// +struct DECLSPEC_UUID("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848") DECLSPEC_NOVTABLE IEnumSetupInstances : public IUnknown +{ + /// + /// Retrieves the next set of product instances in the enumeration sequence. + /// + /// The number of product instances to retrieve. + /// A pointer to an array of . + /// A pointer to the number of product instances retrieved. If celt is 1 this parameter may be NULL. + /// S_OK if the number of elements were fetched, S_FALSE if nothing was fetched (at end of enumeration), E_INVALIDARG if celt is greater than 1 and pceltFetched is NULL, or E_OUTOFMEMORY if an could not be allocated. + STDMETHOD(Next)( + _In_ ULONG celt, + _Out_writes_to_(celt, *pceltFetched) ISetupInstance** rgelt, + _Out_opt_ _Deref_out_range_(0, celt) ULONG* pceltFetched + ) = 0; + + /// + /// Skips the next set of product instances in the enumeration sequence. + /// + /// The number of product instances to skip. + /// S_OK if the number of elements could be skipped; otherwise, S_FALSE; + STDMETHOD(Skip)( + _In_ ULONG celt + ) = 0; + + /// + /// Resets the enumeration sequence to the beginning. + /// + /// Always returns S_OK; + STDMETHOD(Reset)(void) = 0; + + /// + /// Creates a new enumeration object in the same state as the current enumeration object: the new object points to the same place in the enumeration sequence. + /// + /// A pointer to a pointer to a new interface. If the method fails, this parameter is undefined. + /// S_OK if a clone was returned; otherwise, E_OUTOFMEMORY. + STDMETHOD(Clone)( + _Deref_out_opt_ IEnumSetupInstances** ppenum + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupConfiguration; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Gets information about product instances set up on the machine. +/// +struct DECLSPEC_UUID("42843719-DB4C-46C2-8E7C-64F1816EFD5B") DECLSPEC_NOVTABLE ISetupConfiguration : public IUnknown +{ + /// + /// Enumerates all completed product instances installed. + /// + /// An enumeration of completed, installed product instances. + /// Standard HRESULT indicating success or failure. + STDMETHOD(EnumInstances)( + _Out_ IEnumSetupInstances** ppEnumInstances + ) = 0; + + /// + /// Gets the instance for the current process path. + /// + /// The instance for the current process path. + /// The instance for the current process path, or E_NOTFOUND if not found. + STDMETHOD(GetInstanceForCurrentProcess)( + _Out_ ISetupInstance** ppInstance + ) = 0; + + /// + /// Gets the instance for the given path. + /// + /// The instance for the given path. + /// The instance for the given path, or E_NOTFOUND if not found. + STDMETHOD(GetInstanceForPath)( + _In_z_ LPCWSTR wzPath, + _Out_ ISetupInstance** ppInstance + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupConfiguration2; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Gets information about product instances. +/// +struct DECLSPEC_UUID("26AAB78C-4A60-49D6-AF3B-3C35BC93365D") DECLSPEC_NOVTABLE ISetupConfiguration2 : public ISetupConfiguration +{ + /// + /// Enumerates all product instances. + /// + /// An enumeration of all product instances. + /// Standard HRESULT indicating success or failure. + STDMETHOD(EnumAllInstances)( + _Out_ IEnumSetupInstances** ppEnumInstances + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupPackageReference; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// A reference to a package. +/// +struct DECLSPEC_UUID("da8d8a16-b2b6-4487-a2f1-594ccccd6bf5") DECLSPEC_NOVTABLE ISetupPackageReference : public IUnknown +{ + /// + /// Gets the general package identifier. + /// + /// The general package identifier. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetId)( + _Out_ BSTR* pbstrId + ) = 0; + + /// + /// Gets the version of the package. + /// + /// The version of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetVersion)( + _Out_ BSTR* pbstrVersion + ) = 0; + + /// + /// Gets the target process architecture of the package. + /// + /// The target process architecture of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetChip)( + _Out_ BSTR* pbstrChip + ) = 0; + + /// + /// Gets the language and optional region identifier. + /// + /// The language and optional region identifier. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetLanguage)( + _Out_ BSTR* pbstrLanguage + ) = 0; + + /// + /// Gets the build branch of the package. + /// + /// The build branch of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetBranch)( + _Out_ BSTR* pbstrBranch + ) = 0; + + /// + /// Gets the type of the package. + /// + /// The type of the package. + /// Standard HRESULT indicating success or failure. + STDMETHOD(GetType)( + _Out_ BSTR* pbstrType + ) = 0; + + /// + /// Gets the unique identifier consisting of all defined tokens. + /// + /// The unique identifier consisting of all defined tokens. + /// Standard HRESULT indicating success or failure, including E_UNEXPECTED if no Id was defined (required). + STDMETHOD(GetUniqueId)( + _Out_ BSTR* pbstrUniqueId + ) = 0; +}; +#endif + +EXTERN_C const IID IID_ISetupHelper; + +#if defined(__cplusplus) && !defined(CINTERFACE) +/// +/// Helper functions. +/// +/// +/// You can query for this interface from the class. +/// +struct DECLSPEC_UUID("42b21b78-6192-463e-87bf-d577838f1d5c") DECLSPEC_NOVTABLE ISetupHelper : public IUnknown +{ + /// + /// Parses a dotted quad version string into a 64-bit unsigned integer. + /// + /// The dotted quad version string to parse, e.g. 1.2.3.4. + /// A 64-bit unsigned integer representing the version. You can compare this to other versions. + /// Standard HRESULT indicating success or failure. + STDMETHOD(ParseVersion)( + _In_ LPCOLESTR pwszVersion, + _Out_ PULONGLONG pullVersion + ) = 0; + + /// + /// Parses a dotted quad version string into a 64-bit unsigned integer. + /// + /// The string containing 1 or 2 dotted quad version strings to parse, e.g. [1.0,) that means 1.0.0.0 or newer. + /// A 64-bit unsigned integer representing the minimum version, which may be 0. You can compare this to other versions. + /// A 64-bit unsigned integer representing the maximum version, which may be MAXULONGLONG. You can compare this to other versions. + /// Standard HRESULT indicating success or failure. + STDMETHOD(ParseVersionRange)( + _In_ LPCOLESTR pwszVersionRange, + _Out_ PULONGLONG pullMinVersion, + _Out_ PULONGLONG pullMaxVersion + ) = 0; +}; +#endif + +// Class declarations +// +EXTERN_C const CLSID CLSID_SetupConfiguration; + +#ifdef __cplusplus +/// +/// This class implements , , and . +/// +class DECLSPEC_UUID("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D") SetupConfiguration; +#endif + +// Function declarations +// +/// +/// Gets an that provides information about product instances installed on the machine. +/// +/// The that provides information about product instances installed on the machine. +/// Reserved for future use. +/// Standard HRESULT indicating success or failure. +STDMETHODIMP GetSetupConfiguration( + _Out_ ISetupConfiguration** ppConfiguration, + _Reserved_ LPVOID pReserved +); + +#ifdef __cplusplus +} +#endif +#endif ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio10Generator.cxx | 14 - Source/cmGlobalVisualStudio15Generator.cxx | 56 +- Source/cmGlobalVisualStudio15Generator.h | 5 + Source/cmVSSetupHelper.cxx | 395 ++++++++++ Source/cmVSSetupHelper.h | 154 ++++ Source/cmake.cxx | 30 +- Utilities/{cmcurl => cmvssetup}/.gitattributes | 0 Utilities/cmvssetup/Setup.Configuration.h | 978 ++++++++++++++++++++++++ 9 files changed, 1590 insertions(+), 44 deletions(-) create mode 100644 Source/cmVSSetupHelper.cxx create mode 100644 Source/cmVSSetupHelper.h copy Utilities/{cmcurl => cmvssetup}/.gitattributes (100%) create mode 100644 Utilities/cmvssetup/Setup.Configuration.h hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 10:53:23 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 10:53:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1960-g3ae275f Message-ID: <20170110155323.A376FFA3B3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3ae275f4f8a4dcf6721c0112b7d4cfcb9366a35e (commit) via 154def305e7a95d9280573b053170b17539c9f69 (commit) from ae4b031f2bcd15bb06edb97a217d8461926cc950 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ae275f4f8a4dcf6721c0112b7d4cfcb9366a35e commit 3ae275f4f8a4dcf6721c0112b7d4cfcb9366a35e Merge: ae4b031 154def3 Author: Brad King AuthorDate: Tue Jan 10 10:53:22 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 10:53:22 2017 -0500 Merge topic 'SublimeText-no-VERBOSE' into next 154def30 Sublime: Do not build with verbose output https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=154def305e7a95d9280573b053170b17539c9f69 commit 154def305e7a95d9280573b053170b17539c9f69 Author: Richard Collins AuthorDate: Fri Dec 16 12:41:55 2016 -0500 Commit: Brad King CommitDate: Tue Jan 10 10:52:48 2017 -0500 Sublime: Do not build with verbose output Remove the hard-coded use of `make VERBOSE=1` and `ninja -v`. diff --git a/Help/release/dev/SublimeText-no-VERBOSE.rst b/Help/release/dev/SublimeText-no-VERBOSE.rst new file mode 100644 index 0000000..70dfa2b --- /dev/null +++ b/Help/release/dev/SublimeText-no-VERBOSE.rst @@ -0,0 +1,6 @@ +SublimeText-no-VERBOSE +---------------------- + +* The :generator:`Sublime Text 2` generator no longer runs the native + build command (e.g. ``ninja`` or ``make``) with verbose build output + enabled. diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index dfefefe..36ba520 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -323,16 +323,12 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand( std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); command += ", \"/NOLOGO\", \"/f\", \""; command += makefileName + "\""; - command += ", \"VERBOSE=1\", \""; - command += target; - command += "\""; + command += ", \"" + target + "\""; } else if (generator == "Ninja") { std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); command += ", \"-f\", \""; command += makefileName + "\""; - command += ", \"-v\", \""; - command += target; - command += "\""; + command += ", \"" + target + "\""; } else { std::string makefileName; if (generator == "MinGW Makefiles") { @@ -344,9 +340,7 @@ std::string cmExtraSublimeTextGenerator::BuildMakeCommand( } command += ", \"-f\", \""; command += makefileName + "\""; - command += ", \"VERBOSE=1\", \""; - command += target; - command += "\""; + command += ", \"" + target + "\""; } return command; } ----------------------------------------------------------------------- Summary of changes: Help/release/dev/SublimeText-no-VERBOSE.rst | 6 ++++++ Source/cmExtraSublimeTextGenerator.cxx | 12 +++--------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 Help/release/dev/SublimeText-no-VERBOSE.rst hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 10:57:20 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 10:57:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1962-gf79c8a9 Message-ID: <20170110155720.8FBB7FA6B5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f79c8a9fa000f7e3b4cdb984cd91a709cb42bce6 (commit) via b1dc4ddbdd651e8bdd30878fa9afc840d97c9114 (commit) from 3ae275f4f8a4dcf6721c0112b7d4cfcb9366a35e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f79c8a9fa000f7e3b4cdb984cd91a709cb42bce6 commit f79c8a9fa000f7e3b4cdb984cd91a709cb42bce6 Merge: 3ae275f b1dc4dd Author: Brad King AuthorDate: Tue Jan 10 10:57:19 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 10:57:19 2017 -0500 Merge topic 'BundleUtilities-symlink-structure' into next b1dc4ddb BundleUtilities: Maintain symlink structure https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1dc4ddbdd651e8bdd30878fa9afc840d97c9114 commit b1dc4ddbdd651e8bdd30878fa9afc840d97c9114 Author: Martin Koegler AuthorDate: Fri Dec 9 21:55:22 2016 +0100 Commit: Brad King CommitDate: Tue Jan 10 10:55:41 2017 -0500 BundleUtilities: Maintain symlink structure Closes: #15047 diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index b1610e2..5d6f402 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -624,6 +624,33 @@ function(get_bundle_keys app libs dirs keys_var) endif() endforeach() + # preserve library symlink structure + foreach(key ${${keys_var}}) + if("${${key}_COPYFLAG}" STREQUAL 1) + if(IS_SYMLINK "${${key}_RESOLVED_ITEM}") + get_filename_component(target "${${key}_RESOLVED_ITEM}" REALPATH) + set_bundle_key_values(${keys_var} "${exe}" "${target}" "${exepath}" "${dirs}" 1 "${exe_rpaths}") + get_item_key("${target}" targetkey) + + if(WIN32) + # ignore case on Windows + string(TOLOWER "${${key}_RESOLVED_ITEM}" resolved_item_compare) + string(TOLOWER "${${targetkey}_RESOLVED_EMBEDDED_ITEM}" resolved_embedded_item_compare) + else() + set(resolved_item_compare "${${key}_RESOLVED_ITEM}") + set(resolved_embedded_item_compare "${${targetkey}_RESOLVED_EMBEDDED_ITEM}") + endif() + get_filename_component(resolved_item_compare "${resolved_item_compare}" NAME) + get_filename_component(resolved_embedded_item_compare "${resolved_embedded_item_compare}" NAME) + + if(NOT "${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}") + set(${key}_COPYFLAG "2") + set(${key}_RESOLVED_ITEM "${${targetkey}_RESOLVED_EMBEDDED_ITEM}") + endif() + + endif() + endif() + endforeach() # Propagate values to caller's scope: # set(${keys_var} ${${keys_var}} PARENT_SCOPE) @@ -640,6 +667,24 @@ function(get_bundle_keys app libs dirs keys_var) endif() endfunction() +function(link_resolved_item_into_bundle resolved_item resolved_embedded_item) + if(WIN32) + # ignore case on Windows + string(TOLOWER "${resolved_item}" resolved_item_compare) + string(TOLOWER "${resolved_embedded_item}" resolved_embedded_item_compare) + else() + set(resolved_item_compare "${resolved_item}") + set(resolved_embedded_item_compare "${resolved_embedded_item}") + endif() + + if("${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}") + message(STATUS "warning: resolved_item == resolved_embedded_item - not linking...") + else() + get_filename_component(target_dir "${resolved_embedded_item}" DIRECTORY) + file(RELATIVE_PATH symlink_target "${target_dir}" "${resolved_item}") + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${symlink_target}" "${resolved_embedded_item}") + endif() +endfunction() function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item) if(WIN32) @@ -854,7 +899,9 @@ function(fixup_bundle app libs dirs) set(i 0) foreach(key ${keys}) math(EXPR i ${i}+1) - if(${${key}_COPYFLAG}) + if("${${key}_COPYFLAG}" STREQUAL "2") + message(STATUS "${i}/${n}: linking '${${key}_RESOLVED_ITEM}' -> '${${key}_RESOLVED_EMBEDDED_ITEM}'") + elseif(${${key}_COPYFLAG}) message(STATUS "${i}/${n}: copying '${${key}_RESOLVED_ITEM}'") else() message(STATUS "${i}/${n}: *NOT* copying '${${key}_RESOLVED_ITEM}'") @@ -872,7 +919,10 @@ function(fixup_bundle app libs dirs) message(STATUS "") endif() - if(${${key}_COPYFLAG}) + if("${${key}_COPYFLAG}" STREQUAL "2") + link_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}" + "${${key}_RESOLVED_EMBEDDED_ITEM}") + elseif(${${key}_COPYFLAG}) set(item "${${key}_ITEM}") if(item MATCHES "[^/]+\\.framework/") copy_resolved_framework_into_bundle("${${key}_RESOLVED_ITEM}" @@ -889,7 +939,9 @@ function(fixup_bundle app libs dirs) math(EXPR i ${i}+1) if(APPLE) message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'") - fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}") + if(NOT "${${key}_COPYFLAG}" STREQUAL "2") + fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}") + endif() else() message(STATUS "${i}/${n}: fix-up not required on this platform '${${key}_RESOLVED_EMBEDDED_ITEM}'") endif() ----------------------------------------------------------------------- Summary of changes: Modules/BundleUtilities.cmake | 58 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 11:00:20 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 11:00:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1964-gda90f24 Message-ID: <20170110160020.812BCFA720@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via da90f247541d7a3e3cd8ae32fe74450e8ffb46b8 (commit) via 3578e86272b16b303edd640f29781dd316a857a4 (commit) from f79c8a9fa000f7e3b4cdb984cd91a709cb42bce6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da90f247541d7a3e3cd8ae32fe74450e8ffb46b8 commit da90f247541d7a3e3cd8ae32fe74450e8ffb46b8 Merge: f79c8a9 3578e86 Author: Brad King AuthorDate: Tue Jan 10 11:00:19 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 11:00:19 2017 -0500 Merge topic 'issue-16513-concrt140-dll' into next 3578e862 InstallRequiredSystemLibraries: Add concrt*.dll for VC >= 14.0 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3578e86272b16b303edd640f29781dd316a857a4 commit 3578e86272b16b303edd640f29781dd316a857a4 Author: Taylor Braun-Jones AuthorDate: Fri Dec 16 18:02:48 2016 -0500 Commit: Taylor Braun-Jones CommitDate: Fri Dec 16 18:02:48 2016 -0500 InstallRequiredSystemLibraries: Add concrt*.dll for VC >= 14.0 Fixes #16513 diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index b0446c9..f4ae091 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -182,7 +182,10 @@ if(MSVC) "${MSVC${v}_CRT_DIR}/msvcp${v}0.dll" ) if(NOT v VERSION_LESS 14) - list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll") + list(APPEND __install__libs + "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll" + "${MSVC${v}_CRT_DIR}/concrt${v}0.dll" + ) else() list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll") endif() @@ -197,7 +200,10 @@ if(MSVC) "${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll" ) if(NOT v VERSION_LESS 14) - list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll") + list(APPEND __install__libs + "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll" + "${MSVC${v}_CRT_DIR}/concrt${v}0d.dll" + ) else() list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll") endif() ----------------------------------------------------------------------- Summary of changes: Modules/InstallRequiredSystemLibraries.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From domen.vrankar at gmail.com Tue Jan 10 12:48:51 2017 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Tue, 10 Jan 2017 12:48:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1966-g63a8770 Message-ID: <20170110174851.36A9EFA556@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 63a8770f08d0bcb239ceaaa18f5a6ee99af38be2 (commit) via af77368ed3d81c877fc19a64831aff380cf4646e (commit) from da90f247541d7a3e3cd8ae32fe74450e8ffb46b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63a8770f08d0bcb239ceaaa18f5a6ee99af38be2 commit 63a8770f08d0bcb239ceaaa18f5a6ee99af38be2 Merge: da90f24 af77368 Author: Domen Vrankar AuthorDate: Tue Jan 10 12:48:49 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 12:48:49 2017 -0500 Merge topic 'cpack-rpm-user-binary-spec-file-test' into next af77368e CPack/RPM test for using custom binary spec file https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af77368ed3d81c877fc19a64831aff380cf4646e commit af77368ed3d81c877fc19a64831aff380cf4646e Author: Domen Vrankar AuthorDate: Tue Jan 10 18:47:52 2017 +0100 Commit: Domen Vrankar CommitDate: Tue Jan 10 18:47:52 2017 +0100 CPack/RPM test for using custom binary spec file diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index af44182..ebaf792 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -4,6 +4,7 @@ include(RunCMake) include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") # run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP "PACKAGING_TYPES" +run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM" false "MONOLITHIC;COMPONENT") run_cpack_test(CUSTOM_NAMES "RPM;DEB" true "COMPONENT") run_cpack_test(DEBUGINFO "RPM" true "COMPONENT") run_cpack_test(DEPENDENCIES "RPM;DEB" true "COMPONENT") diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake new file mode 100644 index 0000000..694dc00 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake @@ -0,0 +1,9 @@ +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") + +if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(EXPECTED_FILES_COUNT "2") + set(EXPECTED_FILE_1_COMPONENT "test") + set(EXPECTED_FILE_2_COMPONENT "test2") + set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") +endif() diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt new file mode 100644 index 0000000..e6d86d0 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt @@ -0,0 +1,2 @@ +^CPackRPM: Will use USER specified spec file: (/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in +CPackRPM: Will use GENERATED spec file:.*/Tests/RunCMake/RPM/CPack/CUSTOM_BINARY_SPEC_FILE-build/_CPack_Packages/.*/RPM/SPECS/custom_binary_spec_file-test2\.spec$ diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt new file mode 100644 index 0000000..d7bb7af --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt @@ -0,0 +1 @@ +CPackRPM: Will use USER specified spec file: (/[^/]*)*/CUSTOM_BINARY_SPEC_FILE/custom\.spec\.in diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in new file mode 100644 index 0000000..db0ac6f --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in @@ -0,0 +1,80 @@ +# -*- rpm-spec -*- +BuildRoot: %_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@ +Summary: @CPACK_RPM_PACKAGE_SUMMARY@ +Name: @CPACK_RPM_PACKAGE_NAME@ +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@ + + at TMP_RPM_URL@ + at TMP_RPM_REQUIRES@ + at TMP_RPM_REQUIRES_PRE@ + at TMP_RPM_REQUIRES_POST@ + at TMP_RPM_REQUIRES_PREUN@ + at TMP_RPM_REQUIRES_POSTUN@ + at TMP_RPM_PROVIDES@ + at TMP_RPM_OBSOLETES@ + at TMP_RPM_CONFLICTS@ + at TMP_RPM_SUGGESTS@ + at TMP_RPM_AUTOPROV@ + at TMP_RPM_AUTOREQ@ + at TMP_RPM_AUTOREQPROV@ + at TMP_RPM_BUILDARCH@ + at TMP_RPM_PREFIXES@ + + at TMP_RPM_DEBUGINFO@ + +%define _rpmdir %_topdir/RPMS +%define _srcrpmdir %_topdir/SRPMS + at FILE_NAME_DEFINE@ +%define _unpackaged_files_terminate_build 0 + at TMP_RPM_SPEC_INSTALL_POST@ + at CPACK_RPM_SPEC_MORE_DEFINE@ + at CPACK_RPM_COMPRESSION_TYPE_TMP@ + +%description + at CPACK_RPM_PACKAGE_DESCRIPTION@ + +# This is a shortcutted spec file generated by CMake RPM generator +# we skip _install step because CPack does that for us. +# We do only save CPack installed tree in _prepr +# and then restore it in build. +%prep +mv $RPM_BUILD_ROOT %_topdir/tmpBBroot + +%install +if [ -e $RPM_BUILD_ROOT ]; +then + rm -rf $RPM_BUILD_ROOT +fi +mv %_topdir/tmpBBroot $RPM_BUILD_ROOT + + at TMP_RPM_DEBUGINFO_INSTALL@ + +%clean + +%post + at RPM_SYMLINK_POSTINSTALL@ + at CPACK_RPM_SPEC_POSTINSTALL@ + +%postun + at CPACK_RPM_SPEC_POSTUNINSTALL@ + +%pre + at CPACK_RPM_SPEC_PREINSTALL@ + +%preun + at CPACK_RPM_SPEC_PREUNINSTALL@ + +%files +%defattr(@TMP_DEFAULT_FILE_PERMISSIONS@, at TMP_DEFAULT_USER@, at TMP_DEFAULT_GROUP@, at TMP_DEFAULT_DIR_PERMISSIONS@) + at CPACK_RPM_INSTALL_FILES@ + at CPACK_RPM_ABSOLUTE_INSTALL_FILES@ + at CPACK_RPM_USER_INSTALL_FILES@ + +%changelog + at CPACK_RPM_SPEC_CHANGELOG@ + + at TMP_OTHER_COMPONENTS@ diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake new file mode 100644 index 0000000..a604863 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake @@ -0,0 +1,9 @@ +install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +if(PACKAGING_TYPE STREQUAL "MONOLITHIC") + set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_LIST_DIR}/custom.spec.in") +elseif(PACKAGING_TYPE STREQUAL "COMPONENT") + install(FILES CMakeLists.txt DESTINATION bar COMPONENT test2) + set(CPACK_RPM_TEST_USER_BINARY_SPECFILE + "${CMAKE_CURRENT_LIST_DIR}/custom.spec.in") +endif() ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + .../CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake | 9 +++ .../RPM-COMPONENT-stderr.txt | 2 + .../RPM-MONOLITHIC-stderr.txt | 1 + .../tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in | 80 ++++++++++++++++++++ .../CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake | 9 +++ 6 files changed, 102 insertions(+) create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 12:51:32 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 12:51:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1969-g31e1ebf Message-ID: <20170110175133.4F7E5FA68E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 31e1ebf7015852bae9dbc5204e37534ae29c8548 (commit) via b7f0b1240f9c251d059fafcde878168f2b9a6664 (commit) via ba8bb32162ae7bc42c4a3a521a4e4b98274d9d8e (commit) from 63a8770f08d0bcb239ceaaa18f5a6ee99af38be2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31e1ebf7015852bae9dbc5204e37534ae29c8548 commit 31e1ebf7015852bae9dbc5204e37534ae29c8548 Merge: 63a8770 b7f0b12 Author: Brad King AuthorDate: Tue Jan 10 12:51:31 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 12:51:31 2017 -0500 Merge topic 'solaris-build-fixes' into next b7f0b124 libuv requires _XOPEN_SOURCE 600 on Solaris 11 ba8bb321 Disable libuv on Solaris 10 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7f0b1240f9c251d059fafcde878168f2b9a6664 commit b7f0b1240f9c251d059fafcde878168f2b9a6664 Author: Eric Berge AuthorDate: Wed Dec 21 15:38:28 2016 -0600 Commit: Eric Berge CommitDate: Wed Dec 21 22:11:28 2016 -0600 libuv requires _XOPEN_SOURCE 600 on Solaris 11 This avoid build errors from the /usr/include/sys/feature_tests.h include file which disallows setting XOpen versions less than 6 when in C99 mode. diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 1b384b5..a8e25ba 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -218,8 +218,16 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") ) list(APPEND uv_defines __EXTENSIONS__ - _XOPEN_SOURCE=500 ) + if(CMAKE_SYSTEM_VERSION STREQUAL "5.10") + list(APPEND uv_defines + _XOPEN_SOURCE=500 + ) + else() + list(APPEND uv_defines + _XOPEN_SOURCE=600 + ) + endif() list(APPEND uv_sources src/unix/sunos.c ) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba8bb32162ae7bc42c4a3a521a4e4b98274d9d8e commit ba8bb32162ae7bc42c4a3a521a4e4b98274d9d8e Author: Eric Berge AuthorDate: Wed Dec 21 15:34:11 2016 -0600 Commit: Eric Berge CommitDate: Wed Dec 21 15:34:11 2016 -0600 Disable libuv on Solaris 10 Two issues need to be resolved to add Solaris 10 libuv support: 1. libuv needs to provide alternative functionality for systems that do not support mkdtemp() 2. cmake should set SUNOS_NO_IFADDRS for Solaris 10 builds (but not Solaris 11) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aa8010..bec81a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -510,6 +510,9 @@ int main(void) { return 0; } elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") # Disable until it can be ported. set(CMAKE_USE_LIBUV 0) + elseif(CMAKE_SYSTEM STREQUAL "SunOS-5.10") + # Disable until it can be ported. + set(CMAKE_USE_LIBUV 0) endif() endif() if(CMAKE_USE_LIBUV) ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 3 +++ Utilities/cmlibuv/CMakeLists.txt | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:07:54 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:07:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1971-g14f8a66 Message-ID: <20170110180754.77433FAB4A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 14f8a662df08f79471f199ff40444593933e509d (commit) via b8968b4b3984b425497324c302948a197b2badbd (commit) from 31e1ebf7015852bae9dbc5204e37534ae29c8548 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14f8a662df08f79471f199ff40444593933e509d commit 14f8a662df08f79471f199ff40444593933e509d Merge: 31e1ebf b8968b4 Author: Brad King AuthorDate: Tue Jan 10 13:07:53 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:07:53 2017 -0500 Merge topic 'UseSWIG-implicit-depends' into next b8968b4b UseSWIG: Automatically scan dependencies of SWIG files for Makefiles https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8968b4b3984b425497324c302948a197b2badbd commit b8968b4b3984b425497324c302948a197b2badbd Author: Alexey Sokolov AuthorDate: Wed Dec 21 01:53:41 2016 +0000 Commit: Brad King CommitDate: Tue Jan 10 13:05:59 2017 -0500 UseSWIG: Automatically scan dependencies of SWIG files for Makefiles Issue: #4147 diff --git a/Copyright.txt b/Copyright.txt index aa91102..daaa1d1 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -37,6 +37,7 @@ The following individuals and institutions are among the Contributors: * Aleksey Avdeev * Alexander Neundorf * Alexander Smorkalov +* Alexey Sokolov * Alex Turbov * Andreas Pakulat * Andreas Schneider @@ -54,6 +55,7 @@ The following individuals and institutions are among the Contributors: * Eran Ifrah * Esben Mose Hansen, Ange Optimization ApS * Geoffrey Viola +* Google Inc * Gregor Jasny * Helio Chissini de Castro * Ilya Lavrenov diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 651f9f1..ffb72a0 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -212,6 +212,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) "${swig_source_file_fullname}" MAIN_DEPENDENCY "${swig_source_file_fullname}" DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS} + IMPLICIT_DEPENDS CXX "${swig_source_file_fullname}" COMMENT "Swig source") set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files} PROPERTIES GENERATED 1) diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index e6000db..9d4b9cc 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -12,7 +12,7 @@ #include "cmSystemTools.h" #define INCLUDE_REGEX_LINE \ - "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" + "^[ \t]*[#%][ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" #define INCLUDE_REGEX_LINE_MARKER "#IncludeRegexLine: " #define INCLUDE_REGEX_SCAN_MARKER "#IncludeRegexScan: " @@ -420,7 +420,7 @@ void cmDependsC::SetupTransforms() if (!this->TransformRules.empty()) { // Construct the regular expression to match lines to be // transformed. - std::string xform = "^([ \t]*#[ \t]*(include|import)[ \t]*)("; + std::string xform = "^([ \t]*[#%][ \t]*(include|import)[ \t]*)("; const char* sep = ""; for (TransformRulesType::const_iterator tri = this->TransformRules.begin(); tri != this->TransformRules.end(); ++tri) { ----------------------------------------------------------------------- Summary of changes: Copyright.txt | 2 ++ Modules/UseSWIG.cmake | 1 + Source/cmDependsC.cxx | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:14:22 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:14:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1973-gd954016 Message-ID: <20170110181422.C561AFA5E5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d954016868c66aa78b66bd94c2d744b8cc42738a (commit) via 513ef514e51702bf7775f79119f8e3e39ccbb784 (commit) from 14f8a662df08f79471f199ff40444593933e509d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d954016868c66aa78b66bd94c2d744b8cc42738a commit d954016868c66aa78b66bd94c2d744b8cc42738a Merge: 14f8a66 513ef51 Author: Brad King AuthorDate: Tue Jan 10 13:14:22 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:14:22 2017 -0500 Merge topic 'AndroidTestUtilities-fix-cleanup' into next 513ef514 AndroidTestUtilities: fix cleanup operation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=513ef514e51702bf7775f79119f8e3e39ccbb784 commit 513ef514e51702bf7775f79119f8e3e39ccbb784 Author: Ruslan Baratov AuthorDate: Tue Dec 27 21:15:36 2016 +0800 Commit: Brad King CommitDate: Tue Jan 10 13:12:45 2017 -0500 AndroidTestUtilities: fix cleanup operation `su` is not available by default on all devices: ``` > adb shell "echo ls /data/local/tmp | su" /system/bin/sh: su: not found > echo $? 0 ``` Also since `execute_adb_command` use `execute_process` under the hood the pipeline (`|`) will not be treated as special symbol and will be process just like one more command line argument for the `adb`. diff --git a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake index f5f2564..d8ca730 100644 --- a/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake +++ b/Modules/AndroidTestUtilities/PushToAndroidDevice.cmake @@ -117,7 +117,7 @@ function(android_push_test_files_to_device) check_device_file_exists(${_ptd_DEV_TEST_DIR} test_dir_exists) if(test_dir_exists) # This is protected in the SetupProjectTests module. - execute_adb_command(shell echo rm -r ${_ptd_DEV_TEST_DIR} | su) + execute_adb_command(shell rm -r ${_ptd_DEV_TEST_DIR}) endif() execute_adb_command(shell mkdir -p ${_ptd_DEV_TEST_DIR}) ----------------------------------------------------------------------- Summary of changes: Modules/AndroidTestUtilities/PushToAndroidDevice.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:16:36 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:16:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1975-g014c446 Message-ID: <20170110181636.168DFFA703@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 014c446aeeecb24be2a0494f1031cd992fd3d045 (commit) via a9b93501d435bcd30a96e3091255e509fedbb39f (commit) from d954016868c66aa78b66bd94c2d744b8cc42738a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=014c446aeeecb24be2a0494f1031cd992fd3d045 commit 014c446aeeecb24be2a0494f1031cd992fd3d045 Merge: d954016 a9b9350 Author: Brad King AuthorDate: Tue Jan 10 13:16:35 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:16:35 2017 -0500 Merge topic 'FindBoost-1.63' into next a9b93501 FindBoost: Add support for 1.63 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9b93501d435bcd30a96e3091255e509fedbb39f commit a9b93501d435bcd30a96e3091255e509fedbb39f Author: Roger Leigh AuthorDate: Tue Dec 27 12:02:54 2016 +0000 Commit: Brad King CommitDate: Tue Jan 10 13:15:34 2017 -0500 FindBoost: Add support for 1.63 diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index ce4f47c..69476203 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -742,6 +742,21 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106400) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time) + set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_RANDOM_DEPENDENCIES system) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) else() message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}") set(_Boost_IMPORTED_TARGETS FALSE) @@ -948,7 +963,7 @@ else() # _Boost_COMPONENT_HEADERS. See the instructions at the top of # _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.63.0" "1.63" "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 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:27:15 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:27:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1978-g44c85ae Message-ID: <20170110182715.A2E02FA8B0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 44c85ae38a4401379c411a1e3fefce8aefce0eed (commit) via 8deb913d983eee5ad1439ccb98244817d8912602 (commit) via eadd395a1396ed78a3ecea7740f8f4735ab84453 (commit) from 014c446aeeecb24be2a0494f1031cd992fd3d045 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44c85ae38a4401379c411a1e3fefce8aefce0eed commit 44c85ae38a4401379c411a1e3fefce8aefce0eed Merge: 014c446 8deb913 Author: Brad King AuthorDate: Tue Jan 10 13:27:15 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:27:15 2017 -0500 Merge topic 'FindGTest-fixups' into next 8deb913d FindGTest: add lib search path for MSVC x64 platform eadd395a FindGTest: Fix documented GTEST_MSVC_SEARCH default value https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8deb913d983eee5ad1439ccb98244817d8912602 commit 8deb913d983eee5ad1439ccb98244817d8912602 Author: Dong XiaoC AuthorDate: Fri Dec 23 06:31:11 2016 -0500 Commit: Brad King CommitDate: Tue Jan 10 13:26:33 2017 -0500 FindGTest: add lib search path for MSVC x64 platform diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index 931cc18..6540171 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -160,11 +160,17 @@ if(MSVC) if(GTEST_MSVC_SEARCH STREQUAL "MD") list(APPEND _gtest_libpath_suffixes msvc/gtest-md/Debug - msvc/gtest-md/Release) + msvc/gtest-md/Release + msvc/x64/Debug + msvc/x64/Release + ) elseif(GTEST_MSVC_SEARCH STREQUAL "MT") list(APPEND _gtest_libpath_suffixes msvc/gtest/Debug - msvc/gtest/Release) + msvc/gtest/Release + msvc/x64/Debug + msvc/x64/Release + ) endif() endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eadd395a1396ed78a3ecea7740f8f4735ab84453 commit eadd395a1396ed78a3ecea7740f8f4735ab84453 Author: Dong XiaoC AuthorDate: Fri Dec 23 06:28:25 2016 -0500 Commit: Brad King CommitDate: Tue Jan 10 13:25:59 2017 -0500 FindGTest: Fix documented GTEST_MSVC_SEARCH default value Documentation updates in commit v3.5.0-rc1~124^2~2 (FindGTest: Add imported targets and update documentation, 2015-12-10) accidentally changed the documented default to the wrong value. Restore the documentation to refer to the actual default used in the implementation. diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index 76ab716..931cc18 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -49,8 +49,8 @@ # The root directory of the Google Test installation (may also be # set as an environment variable) # ``GTEST_MSVC_SEARCH`` -# If compiling with MSVC, this variable can be set to ``MD`` or -# ``MT`` (the default) to enable searching a GTest build tree +# If compiling with MSVC, this variable can be set to ``MT`` or +# ``MD`` (the default) to enable searching a GTest build tree # # # Example usage ----------------------------------------------------------------------- Summary of changes: Modules/FindGTest.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:43:37 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:43:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1980-g0287d41 Message-ID: <20170110184337.D7041F9939@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 0287d41c435914431fee29ce064a480c5eb59174 (commit) via 696339a9d571ff7d37222296164dd738a6a2b042 (commit) from 44c85ae38a4401379c411a1e3fefce8aefce0eed (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0287d41c435914431fee29ce064a480c5eb59174 commit 0287d41c435914431fee29ce064a480c5eb59174 Merge: 44c85ae 696339a Author: Brad King AuthorDate: Tue Jan 10 13:43:36 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:43:36 2017 -0500 Merge topic 'FindOpenSSL-check-both' into next 696339a9 FindOpenSSL: Check that both CRYPTO and SSL libraries are present https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=696339a9d571ff7d37222296164dd738a6a2b042 commit 696339a9d571ff7d37222296164dd738a6a2b042 Author: Harry Mallon AuthorDate: Tue Jan 3 19:10:53 2017 +0000 Commit: Brad King CommitDate: Tue Jan 10 13:42:48 2017 -0500 FindOpenSSL: Check that both CRYPTO and SSL libraries are present * Strawberry perl on Windows installs one that is found by the default finder While at it, de-duplicate code setting `OPENSSL_LIBRARIES`. diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 30fc5c6..6259ce1 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -204,7 +204,6 @@ if(WIN32 AND NOT CYGWIN) SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE) set(OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} ) set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} ) - set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) elseif(MINGW) # same player, for MinGW set(LIB_EAY_NAMES crypto libeay32) @@ -232,7 +231,6 @@ if(WIN32 AND NOT CYGWIN) mark_as_advanced(SSL_EAY LIB_EAY) set(OPENSSL_SSL_LIBRARY ${SSL_EAY} ) set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) - set(OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) unset(LIB_EAY_NAMES) unset(SSL_EAY_NAMES) else() @@ -264,7 +262,6 @@ if(WIN32 AND NOT CYGWIN) mark_as_advanced(SSL_EAY LIB_EAY) set(OPENSSL_SSL_LIBRARY ${SSL_EAY} ) set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) - set(OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) endif() else() @@ -298,8 +295,6 @@ else() set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY}) set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) - set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) - endif() function(from_hex HEX DEC) @@ -371,10 +366,13 @@ endif () include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ) + if (OPENSSL_VERSION) find_package_handle_standard_args(OpenSSL REQUIRED_VARS - OPENSSL_LIBRARIES + OPENSSL_SSL_LIBRARY + OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR VERSION_VAR OPENSSL_VERSION @@ -383,7 +381,8 @@ if (OPENSSL_VERSION) ) else () find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR" - OPENSSL_LIBRARIES + OPENSSL_SSL_LIBRARY + OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR ) endif () ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenSSL.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:53:14 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:53:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1982-gdeefc13 Message-ID: <20170110185314.63361FA267@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via deefc1319b83543ff4ffe65feded4ddc290b6a54 (commit) via 6ad05df8bafd62b7ecb70d68cb395b72caf5fd8b (commit) from 0287d41c435914431fee29ce064a480c5eb59174 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=deefc1319b83543ff4ffe65feded4ddc290b6a54 commit deefc1319b83543ff4ffe65feded4ddc290b6a54 Merge: 0287d41 6ad05df Author: Brad King AuthorDate: Tue Jan 10 13:53:13 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:53:13 2017 -0500 Merge topic 'android_clang_asm' into next 6ad05df8 Android: Set compiler target platform when compiling ASM with Clang https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ad05df8bafd62b7ecb70d68cb395b72caf5fd8b commit 6ad05df8bafd62b7ecb70d68cb395b72caf5fd8b Author: Florent Castelli AuthorDate: Fri Jan 6 23:33:37 2017 +0100 Commit: Brad King CommitDate: Tue Jan 10 13:51:42 2017 -0500 Android: Set compiler target platform when compiling ASM with Clang diff --git a/Modules/Platform/Android-Clang-ASM.cmake b/Modules/Platform/Android-Clang-ASM.cmake new file mode 100644 index 0000000..6448da6 --- /dev/null +++ b/Modules/Platform/Android-Clang-ASM.cmake @@ -0,0 +1,2 @@ +include(Platform/Android-Clang) +__android_compiler_clang(ASM) diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake index f0cf4a5..f739ab1 100644 --- a/Modules/Platform/Android-Clang.cmake +++ b/Modules/Platform/Android-Clang.cmake @@ -35,7 +35,9 @@ include(Platform/Android-Common) include(Platform/Android/abi-${CMAKE_ANDROID_ARCH_ABI}-Clang) macro(__android_compiler_clang lang) - __android_compiler_common(${lang}) + if(NOT "x${lang}" STREQUAL "xASM") + __android_compiler_common(${lang}) + endif() if(NOT CMAKE_${lang}_COMPILER_TARGET) set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}") endif() ----------------------------------------------------------------------- Summary of changes: .../Platform/{Android-Clang-C.cmake => Android-Clang-ASM.cmake} | 2 +- Modules/Platform/Android-Clang.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) copy Modules/Platform/{Android-Clang-C.cmake => Android-Clang-ASM.cmake} (51%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 13:59:50 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 13:59:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1984-gb4636f7 Message-ID: <20170110185950.99921FA40A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b4636f780f83e0da8431a5cfd6725878baf65aab (commit) via 7a9b109e598b5beea2f5d370a8ed60bf28ec29ba (commit) from deefc1319b83543ff4ffe65feded4ddc290b6a54 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4636f780f83e0da8431a5cfd6725878baf65aab commit b4636f780f83e0da8431a5cfd6725878baf65aab Merge: deefc13 7a9b109 Author: Brad King AuthorDate: Tue Jan 10 13:59:50 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 13:59:50 2017 -0500 Merge topic 'asan_overriding_user_options' into next 7a9b109e ctest_memcheck: Append sanitizers user options to allow overriding https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a9b109e598b5beea2f5d370a8ed60bf28ec29ba commit 7a9b109e598b5beea2f5d370a8ed60bf28ec29ba Author: Sylvain Joubert AuthorDate: Mon Dec 19 11:59:45 2016 +0100 Commit: Sylvain Joubert CommitDate: Mon Dec 19 11:59:45 2016 +0100 ctest_memcheck: Append sanitizers user options to allow overriding diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 2c31f60..8686d77 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -602,7 +602,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() if (this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER) { envVar = "ASAN_OPTIONS"; - extraOptions += " detect_leaks=1"; + extraOptions = "detect_leaks=1 " + extraOptions; } else if (this->MemoryTesterStyle == cmCTestMemCheckHandler::THREAD_SANITIZER) { envVar = "TSAN_OPTIONS"; ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 14:13:34 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 14:13:34 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1986-g202c24a Message-ID: <20170110191334.EF723F9586@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 202c24a3e137558723f8d781ccbdd3665daa8b2e (commit) via 524f5ee186f95a0dc0dc449e437910a72b175893 (commit) from b4636f780f83e0da8431a5cfd6725878baf65aab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=202c24a3e137558723f8d781ccbdd3665daa8b2e commit 202c24a3e137558723f8d781ccbdd3665daa8b2e Merge: b4636f7 524f5ee Author: Brad King AuthorDate: Tue Jan 10 14:13:34 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 14:13:34 2017 -0500 Merge topic 'android_clang_asm' into next 524f5ee1 Android: Set compiler target platform when compiling ASM with Clang https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=524f5ee186f95a0dc0dc449e437910a72b175893 commit 524f5ee186f95a0dc0dc449e437910a72b175893 Author: Florent Castelli AuthorDate: Fri Jan 6 23:33:37 2017 +0100 Commit: Brad King CommitDate: Tue Jan 10 14:12:46 2017 -0500 Android: Set compiler target platform when compiling ASM with Clang Closes: #16535 diff --git a/Modules/Platform/Android-Clang-ASM.cmake b/Modules/Platform/Android-Clang-ASM.cmake new file mode 100644 index 0000000..6448da6 --- /dev/null +++ b/Modules/Platform/Android-Clang-ASM.cmake @@ -0,0 +1,2 @@ +include(Platform/Android-Clang) +__android_compiler_clang(ASM) diff --git a/Modules/Platform/Android-Clang.cmake b/Modules/Platform/Android-Clang.cmake index f0cf4a5..f739ab1 100644 --- a/Modules/Platform/Android-Clang.cmake +++ b/Modules/Platform/Android-Clang.cmake @@ -35,7 +35,9 @@ include(Platform/Android-Common) include(Platform/Android/abi-${CMAKE_ANDROID_ARCH_ABI}-Clang) macro(__android_compiler_clang lang) - __android_compiler_common(${lang}) + if(NOT "x${lang}" STREQUAL "xASM") + __android_compiler_common(${lang}) + endif() if(NOT CMAKE_${lang}_COMPILER_TARGET) set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}") endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 14:16:53 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 14:16:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1988-gf1926db Message-ID: <20170110191653.9D98AFA559@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f1926db39ba43c3ba8d3397425fd93de71d6bbf1 (commit) via 2ad86c4232bec1eb5205f67a350084cc77018f27 (commit) from 202c24a3e137558723f8d781ccbdd3665daa8b2e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1926db39ba43c3ba8d3397425fd93de71d6bbf1 commit f1926db39ba43c3ba8d3397425fd93de71d6bbf1 Merge: 202c24a 2ad86c4 Author: Brad King AuthorDate: Tue Jan 10 14:16:52 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 14:16:52 2017 -0500 Merge topic 'asan_overriding_user_options' into next 2ad86c42 Revert "ctest_memcheck: Append sanitizers user options to allow overriding" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ad86c4232bec1eb5205f67a350084cc77018f27 commit 2ad86c4232bec1eb5205f67a350084cc77018f27 Author: Brad King AuthorDate: Tue Jan 10 14:16:45 2017 -0500 Commit: Brad King CommitDate: Tue Jan 10 14:16:45 2017 -0500 Revert "ctest_memcheck: Append sanitizers user options to allow overriding" This reverts commit 7a9b109e598b5beea2f5d370a8ed60bf28ec29ba. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 8686d77..2c31f60 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -602,7 +602,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() if (this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER) { envVar = "ASAN_OPTIONS"; - extraOptions = "detect_leaks=1 " + extraOptions; + extraOptions += " detect_leaks=1"; } else if (this->MemoryTesterStyle == cmCTestMemCheckHandler::THREAD_SANITIZER) { envVar = "TSAN_OPTIONS"; ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 14:25:19 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 14:25:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-1990-gb526e70 Message-ID: <20170110192519.25C32FA660@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b526e70725cc58b1bc51c0d5c4f3f9c00a908387 (commit) via ff91b1514be75dee07e8009a60ad39284e8844b4 (commit) from f1926db39ba43c3ba8d3397425fd93de71d6bbf1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b526e70725cc58b1bc51c0d5c4f3f9c00a908387 commit b526e70725cc58b1bc51c0d5c4f3f9c00a908387 Merge: f1926db ff91b15 Author: Brad King AuthorDate: Tue Jan 10 14:25:18 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 14:25:18 2017 -0500 Merge topic 'FindBoost-find-default' into next ff91b151 FindBoost: Search official location of prebuilt binaries on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff91b1514be75dee07e8009a60ad39284e8844b4 commit ff91b1514be75dee07e8009a60ad39284e8844b4 Author: Alex Turbov AuthorDate: Wed Dec 21 16:12:09 2016 +0800 Commit: Brad King CommitDate: Tue Jan 10 14:21:53 2017 -0500 FindBoost: Search official location of prebuilt binaries on Windows Make it possible to find Boost in the default install path (`c:\boost`) of an official prebuilt binaries installation even when `BOOST_ROOT` has not been specified. diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index e6bf3dc..ee5e668 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -877,7 +877,7 @@ endfunction() # This function would append corresponding directories if MSVC is a current compiler, # so having `BOOST_ROOT` would be enough to specify to find everything. # -macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) +macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_arch_suffix 64) @@ -885,19 +885,19 @@ macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar base set(_arch_suffix 32) endif() if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-15.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-15.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-14.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-12.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-12.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-11.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-11.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-10.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-10.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-9.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-9.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-8.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0) endif() endif() endmacro() @@ -1361,10 +1361,10 @@ foreach(c DEBUG RELEASE) if(BOOST_ROOT) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib) - _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} BOOST_ROOT) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${BOOST_ROOT}") elseif(_ENV_BOOST_ROOT) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib) - _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} _ENV_BOOST_ROOT) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${_ENV_BOOST_ROOT}") endif() list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} @@ -1372,6 +1372,7 @@ foreach(c DEBUG RELEASE) ${Boost_INCLUDE_DIR}/../lib ${Boost_INCLUDE_DIR}/stage/lib ) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..") if( Boost_NO_SYSTEM_PATHS ) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) else() @@ -1380,6 +1381,7 @@ foreach(c DEBUG RELEASE) C:/boost /sw/local/lib ) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost") endif() endif() endforeach() ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 14:32:47 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 14:32:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2023-g25b5e76 Message-ID: <20170110193247.C8CD4FA6DB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 25b5e76e15b3b5fe6e0aacd5345ecd1f3d360e5b (commit) via b393e63bc9b98b429dc1bbaf21a4e2d481dfec4b (commit) via 331eb74b795cae914ec88e58f2c0bec69c17a853 (commit) via cbc07d331d1d5429dc1e0b7c6c7949ff8d9efdf1 (commit) via c17e0a3ad58f06fcb0827910af520405670b3d51 (commit) via 53787bf8de2d3981f650e9036bb89cb6ed884a75 (commit) via 8dbdd3e726ead25c179e6eb4ffab212a1db3aba8 (commit) via 0699760d5c8b644242ddd4ac6d07d8c4c68f2b94 (commit) via a84f0bb726ebcc8e9bf3db0b99e5b6fd8a720045 (commit) via 7b766b83952ec4c431a55d2f6e589a5f806834c9 (commit) via 2964b8cca4155fa318722f6ef17f0d4d56ee2f29 (commit) via d58b6bf31c18cfedd4a2f15e009b8e5cbdc21b6e (commit) via 94c319f93309ff4cddd0280cdcbd48b50492db36 (commit) via 966be439e07131c3ff84175c1a9e3b6336908d8e (commit) via de531432887487943dbe4ae5a1bde762d5582e06 (commit) via d8e45536fb3637454cf17a638dcd9fc236e94660 (commit) via d9313a82906ced0ff3c76828e86d9d7a248a5e49 (commit) via 32d3540e090c4a24d55b99c49c094a9cb574c9b3 (commit) via e7280a7f1743d73cdab41ed709a9e1d0f99b6342 (commit) via 63d3ca4c1cab0c7b9c71d6c051c3b4c053eb7627 (commit) via 6ae19bf32e232beb59a0c427d82c0761e8248ab8 (commit) via 9986da4f0f2f49c0d7d260f9d21deaa906708376 (commit) via d51cc88e844c78c01c1616e6a2fb102c0682dd00 (commit) via cf1d5a9cdba49a2e9f08879d756ae118b22bfc6a (commit) via f962275987e17cf94da663a919f52b6d0c8f44f4 (commit) via c736c41ad192c89e1c74751a8f401c75955f5f3b (commit) via cbd650c2642e40369eaa53d20dafee6cdccae4af (commit) via 0b1527ff3d1781380756ee72a9641b7c5c7c87cc (commit) via 2b9d795e63acf723a6abd79f3195ec70476442a5 (commit) via 2cfcdf757d032cdea8b980792007a6f9d749e6fb (commit) via 2f67aef23d4192fadb222dc79311fb5ffbbc36ce (commit) via 794fdf40a1bc85dded519d7c737f73690e3a6e42 (commit) via a1e49bb155132606ed9f590c0b62e68f2e288d0b (commit) from b526e70725cc58b1bc51c0d5c4f3f9c00a908387 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25b5e76e15b3b5fe6e0aacd5345ecd1f3d360e5b commit 25b5e76e15b3b5fe6e0aacd5345ecd1f3d360e5b Merge: b526e70 b393e63 Author: Brad King AuthorDate: Tue Jan 10 14:32:45 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 14:32:45 2017 -0500 Merge topic 'Autogen_Simplify' into next b393e63b AUTOGEN: Release notes for SKIP_AUTOX 331eb74b AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC cbc07d33 AUTOGEN: Documentation for SKIP_AUTOX source file properties c17e0a3a AUTOGEN: Tests: AUTORCC SKIP_AUTORCC and SKIP_AUTOGEN test 53787bf8 AUTOGEN: Tests: AUTOUIC SKIP_AUTOUIC and SKIP_AUTOGEN test 8dbdd3e7 AUTOGEN: Tests: AUTOMOC SKIP_AUTOMOC and SKIP_AUTOGEN test 0699760d AUTOGEN: Generators: Do moc/uic skip test during file list generation a84f0bb7 AUTOGEN: Generators: Message upper/lower case unification 7b766b83 AUTOGEN: Generators: Use single moc/uic skip test method only 2964b8cc AUTOGEN: Generators: Use AUTOMOC/UIC/RCC instead of AUTOGEN in messages d58b6bf3 AUTOGEN: Generators: Moc/UicSkipTest methods 94c319f9 AUTOGEN: Generators: Use separate header lists for MOC and UIC 966be439 AUTOGEN: Generators: Be verbose about skipping files de531432 AUTOGEN: Generators: Remove unused variable d8e45536 AUTOGEN: Initializer: Always remember skipped files d9313a82 AUTOGEN: Initializer: Enable SKIP_AUTOGEN on all AUTOGEN generated sources ... https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b393e63bc9b98b429dc1bbaf21a4e2d481dfec4b commit b393e63bc9b98b429dc1bbaf21a4e2d481dfec4b Author: Sebastian Holtermann AuthorDate: Mon Jan 2 18:02:53 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:17 2017 +0100 AUTOGEN: Release notes for SKIP_AUTOX diff --git a/Help/release/dev/QtAutogen_Skip.rst b/Help/release/dev/QtAutogen_Skip.rst new file mode 100644 index 0000000..37f795c --- /dev/null +++ b/Help/release/dev/QtAutogen_Skip.rst @@ -0,0 +1,12 @@ +QtAutogen_Skip +-------------- + +* The source file properties + :prop_sf:`SKIP_AUTOMOC`, + :prop_sf:`SKIP_AUTOUIC`, + :prop_sf:`SKIP_AUTORCC` and + :prop_sf:`SKIP_AUTOGEN` + allow to exclude files from + :prop_tgt:`AUTOMOC`, + :prop_tgt:`AUTOUIC` and + :prop_tgt:`AUTORCC` processing. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=331eb74b795cae914ec88e58f2c0bec69c17a853 commit 331eb74b795cae914ec88e58f2c0bec69c17a853 Author: Sebastian Holtermann AuthorDate: Mon Jan 2 17:45:17 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:17 2017 +0100 AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst index 80b0f49..c348f3f 100644 --- a/Help/manual/cmake-qt.7.rst +++ b/Help/manual/cmake-qt.7.rst @@ -83,6 +83,9 @@ following targets by setting the :variable:`CMAKE_AUTOMOC` variable. The options to pass to ``moc``. The :variable:`CMAKE_AUTOMOC_MOC_OPTIONS` variable may be populated to pre-set the options for all following targets. +Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by +enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`. + .. _`Qt AUTOUIC`: AUTOUIC @@ -151,6 +154,9 @@ result of linking with the :prop_tgt:`IMPORTED` target: .. _`Qt AUTORCC`: +Source files can be excluded from :prop_tgt:`AUTOUIC` processing by +enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`. + AUTORCC ^^^^^^^ @@ -171,6 +177,9 @@ populated to pre-set the options for all following targets. The ``.qrc`` file to set particular options for the file. This overrides options from the :prop_tgt:`AUTORCC_OPTIONS` target property. +Source files can be excluded from :prop_tgt:`AUTORCC` processing by +enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`. + qtmain.lib on Windows ===================== diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst index 30a39b1..b42643f 100644 --- a/Help/prop_tgt/AUTOMOC.rst +++ b/Help/prop_tgt/AUTOMOC.rst @@ -47,5 +47,8 @@ See the documentation for this variable for more details. The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the automoc targets together in an IDE, e.g. in MSVS. +Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by +enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTORCC.rst b/Help/prop_tgt/AUTORCC.rst index 158fdf8..1ad0895 100644 --- a/Help/prop_tgt/AUTORCC.rst +++ b/Help/prop_tgt/AUTORCC.rst @@ -24,5 +24,8 @@ generate unspecified unique names for ``rcc``. Therefore if ``Q_INIT_RESOURCE()`` or ``Q_CLEANUP_RESOURCE()`` need to be used the ``.qrc`` file name must be unique. +Source files can be excluded from :prop_tgt:`AUTORCC` processing by +enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTOUIC.rst b/Help/prop_tgt/AUTOUIC.rst index 4e60ec3..fbf24c3 100644 --- a/Help/prop_tgt/AUTOUIC.rst +++ b/Help/prop_tgt/AUTOUIC.rst @@ -20,5 +20,8 @@ Additional command line options for ``uic`` can be set via the The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the autouic targets together in an IDE, e.g. in MSVS. +Source files can be excluded from :prop_tgt:`AUTOUIC` processing by +enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbc07d331d1d5429dc1e0b7c6c7949ff8d9efdf1 commit cbc07d331d1d5429dc1e0b7c6c7949ff8d9efdf1 Author: Sebastian Holtermann AuthorDate: Mon Jan 2 17:28:36 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:17 2017 +0100 AUTOGEN: Documentation for SKIP_AUTOX source file properties diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 971834e..c93ace1 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -357,6 +357,10 @@ Properties on Source Files /prop_sf/MACOSX_PACKAGE_LOCATION /prop_sf/OBJECT_DEPENDS /prop_sf/OBJECT_OUTPUTS + /prop_sf/SKIP_AUTOGEN + /prop_sf/SKIP_AUTOMOC + /prop_sf/SKIP_AUTORCC + /prop_sf/SKIP_AUTOUIC /prop_sf/SYMBOLIC /prop_sf/VS_DEPLOYMENT_CONTENT /prop_sf/VS_DEPLOYMENT_LOCATION diff --git a/Help/prop_sf/SKIP_AUTOGEN.rst b/Help/prop_sf/SKIP_AUTOGEN.rst new file mode 100644 index 0000000..6bf2409 --- /dev/null +++ b/Help/prop_sf/SKIP_AUTOGEN.rst @@ -0,0 +1,8 @@ +SKIP_AUTOGEN +------------ + +Exclude the source file from :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC` and +:prop_tgt:`AUTORCC` processing (for Qt projects). + +For finer control see :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC` and +:prop_sf:`SKIP_AUTORCC`. diff --git a/Help/prop_sf/SKIP_AUTOMOC.rst b/Help/prop_sf/SKIP_AUTOMOC.rst new file mode 100644 index 0000000..2245ca6 --- /dev/null +++ b/Help/prop_sf/SKIP_AUTOMOC.rst @@ -0,0 +1,6 @@ +SKIP_AUTOMOC +------------ + +Exclude the source file from :prop_tgt:`AUTOMOC` processing (for Qt projects). + +For broader control see :prop_sf:`SKIP_AUTOGEN` diff --git a/Help/prop_sf/SKIP_AUTORCC.rst b/Help/prop_sf/SKIP_AUTORCC.rst new file mode 100644 index 0000000..394d8f8 --- /dev/null +++ b/Help/prop_sf/SKIP_AUTORCC.rst @@ -0,0 +1,6 @@ +SKIP_AUTORCC +------------ + +Exclude the source file from :prop_tgt:`AUTORCC` processing (for Qt projects). + +For broader control see :prop_sf:`SKIP_AUTOGEN` diff --git a/Help/prop_sf/SKIP_AUTOUIC.rst b/Help/prop_sf/SKIP_AUTOUIC.rst new file mode 100644 index 0000000..50f78ef --- /dev/null +++ b/Help/prop_sf/SKIP_AUTOUIC.rst @@ -0,0 +1,6 @@ +SKIP_AUTOUIC +------------ + +Exclude the source file from :prop_tgt:`AUTOUIC` processing (for Qt projects). + +For broader control see :prop_sf:`SKIP_AUTOGEN` https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c17e0a3ad58f06fcb0827910af520405670b3d51 commit c17e0a3ad58f06fcb0827910af520405670b3d51 Author: Sebastian Holtermann AuthorDate: Sun Jan 1 16:45:40 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:17 2017 +0100 AUTOGEN: Tests: AUTORCC SKIP_AUTORCC and SKIP_AUTOGEN test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 045f5b9..4b90ad8 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -181,6 +181,27 @@ set_property(TARGET skipUicB PROPERTY AUTOUIC ON) set_property(TARGET skipUicB PROPERTY AUTOMOC ON) target_link_libraries(skipUicB ${QT_LIBRARIES}) +# -- Test: AUTORCC, SKIP_AUTORCC +# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target +set(skipRccSources + skipRcc.cpp + skipSource/skipRccBad1.qrc + skipSource/skipRccBad2.qrc + skipSource/skipRccGood.qrc +) +set_property(SOURCE skipSource/skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON) +set_property(SOURCE skipSource/skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON) +# AUTORCC enabled +add_executable(skipRccA ${skipRccSources}) +set_property(TARGET skipRccA PROPERTY AUTORCC ON) +target_link_libraries(skipRccA ${QT_LIBRARIES}) +# AUTORCC, AUTOUIC and AUTOMOC enabled +add_executable(skipRccB ${skipRccSources}) +set_property(TARGET skipRccB PROPERTY AUTORCC ON) +set_property(TARGET skipRccB PROPERTY AUTOUIC ON) +set_property(TARGET skipRccB PROPERTY AUTOMOC ON) +target_link_libraries(skipRccB ${QT_LIBRARIES}) + # -- Test: AUTOMOC AUTORCC # Source files with the same basename in different subdirectories add_subdirectory(sameName) diff --git a/Tests/QtAutogen/skipRcc.cpp b/Tests/QtAutogen/skipRcc.cpp new file mode 100644 index 0000000..ec57110 --- /dev/null +++ b/Tests/QtAutogen/skipRcc.cpp @@ -0,0 +1,9 @@ + +extern int qInitResources_skipRccGood(); + +int main(int, char**) +{ + // Fails to link if the symbol is not present. + qInitResources_skipRccGood(); + return 0; +} diff --git a/Tests/QtAutogen/skipSource/skipRccBad1.qrc b/Tests/QtAutogen/skipSource/skipRccBad1.qrc new file mode 100644 index 0000000..6cbd9ed --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipRccBad1.qrc @@ -0,0 +1,5 @@ + + + skipRccGood.cpp>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + diff --git a/Tests/QtAutogen/skipSource/skipRccBad2.qrc b/Tests/QtAutogen/skipSource/skipRccBad2.qrc new file mode 100644 index 0000000..b32c589 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipRccBad2.qrc @@ -0,0 +1,5 @@ +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>< + + skipRccGood.cpp + + diff --git a/Tests/QtAutogen/skipSource/skipRccGood.qrc b/Tests/QtAutogen/skipSource/skipRccGood.qrc new file mode 100644 index 0000000..21a94b0 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipRccGood.qrc @@ -0,0 +1,6 @@ + + + skipRccBad1.qrc + skipRccBad2.qrc + + https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53787bf8de2d3981f650e9036bb89cb6ed884a75 commit 53787bf8de2d3981f650e9036bb89cb6ed884a75 Author: Sebastian Holtermann AuthorDate: Sun Jan 1 15:42:32 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Tests: AUTOUIC SKIP_AUTOUIC and SKIP_AUTOGEN test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 068b037..045f5b9 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -161,6 +161,26 @@ set_property(TARGET skipMocB PROPERTY AUTOMOC ON) set_property(TARGET skipMocB PROPERTY AUTOUIC ON) target_link_libraries(skipMocB ${QT_LIBRARIES}) +# -- Test: AUTOUIC, SKIP_AUTOUIC +# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target +set(skipUicSources + skipUic.cpp + skipSource/skipUicGen.cpp + skipSource/skipUicNoGen1.cpp + skipSource/skipUicNoGen2.cpp +) +set_property(SOURCE skipSource/skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON) +set_property(SOURCE skipSource/skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON) +# AUTOUIC enabled +add_executable(skipUicA ${skipUicSources}) +set_property(TARGET skipUicA PROPERTY AUTOUIC ON) +target_link_libraries(skipUicA ${QT_LIBRARIES}) +# AUTOUIC and AUTOMOC enabled +add_executable(skipUicB ${skipUicSources}) +set_property(TARGET skipUicB PROPERTY AUTOUIC ON) +set_property(TARGET skipUicB PROPERTY AUTOMOC ON) +target_link_libraries(skipUicB ${QT_LIBRARIES}) + # -- Test: AUTOMOC AUTORCC # Source files with the same basename in different subdirectories add_subdirectory(sameName) diff --git a/Tests/QtAutogen/skipSource/skipUicGen.cpp b/Tests/QtAutogen/skipSource/skipUicGen.cpp new file mode 100644 index 0000000..d2a55a6 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipUicGen.cpp @@ -0,0 +1,7 @@ + +#include "skipUicGen.hpp" +#include "ui_uigen2.h" + +void skipGen() +{ +} diff --git a/Tests/QtAutogen/skipSource/skipUicGen.hpp b/Tests/QtAutogen/skipSource/skipUicGen.hpp new file mode 100644 index 0000000..3669f0e --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipUicGen.hpp @@ -0,0 +1,8 @@ +#ifndef SKIPUICGEN_HPP +#define SKIPUICGEN_HPP + +#include "ui_uigen1.h" + +void skipGen(); + +#endif diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp b/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp new file mode 100644 index 0000000..f591a42 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipUicNoGen1.cpp @@ -0,0 +1,7 @@ + +#include "skipUicNoGen1.hpp" +#include "ui_nogen2.h" + +void skipNoGen1() +{ +} diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp b/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp new file mode 100644 index 0000000..2864695 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipUicNoGen1.hpp @@ -0,0 +1,8 @@ +#ifndef SKIPUICNOGEN1_H +#define SKIPUICNOGEN1_H + +#include "ui_nogen1.h" + +void skipNoGen1(); + +#endif diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp b/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp new file mode 100644 index 0000000..8c1c324 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipUicNoGen2.cpp @@ -0,0 +1,7 @@ + +#include "skipUicNoGen2.hpp" +#include "ui_nogen2.h" + +void skipNoGen2() +{ +} diff --git a/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp b/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp new file mode 100644 index 0000000..7c38193 --- /dev/null +++ b/Tests/QtAutogen/skipSource/skipUicNoGen2.hpp @@ -0,0 +1,8 @@ +#ifndef SKIPUICNOGEN2_H +#define SKIPUICNOGEN2_H + +#include "ui_nogen1.h" + +void skipNoGen2(); + +#endif diff --git a/Tests/QtAutogen/skipSource/ui_nogen1.h b/Tests/QtAutogen/skipSource/ui_nogen1.h new file mode 100644 index 0000000..a7be52b --- /dev/null +++ b/Tests/QtAutogen/skipSource/ui_nogen1.h @@ -0,0 +1,6 @@ +#ifndef UI_NOGEN1_H +#define UI_NOGEN1_H + +void ui_nogen1(); + +#endif diff --git a/Tests/QtAutogen/skipSource/ui_nogen2.h b/Tests/QtAutogen/skipSource/ui_nogen2.h new file mode 100644 index 0000000..5d547d4 --- /dev/null +++ b/Tests/QtAutogen/skipSource/ui_nogen2.h @@ -0,0 +1,6 @@ +#ifndef UI_NOGEN2_H +#define UI_NOGEN2_H + +void ui_nogen2(); + +#endif \ No newline at end of file diff --git a/Tests/QtAutogen/skipSource/uigen1.ui b/Tests/QtAutogen/skipSource/uigen1.ui new file mode 100644 index 0000000..fc7cb82 --- /dev/null +++ b/Tests/QtAutogen/skipSource/uigen1.ui @@ -0,0 +1,24 @@ + + + UiGen1 + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + + + diff --git a/Tests/QtAutogen/skipSource/uigen2.ui b/Tests/QtAutogen/skipSource/uigen2.ui new file mode 100644 index 0000000..01f08d2 --- /dev/null +++ b/Tests/QtAutogen/skipSource/uigen2.ui @@ -0,0 +1,24 @@ + + + UiGen2 + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + + + diff --git a/Tests/QtAutogen/skipUic.cpp b/Tests/QtAutogen/skipUic.cpp new file mode 100644 index 0000000..0adf011 --- /dev/null +++ b/Tests/QtAutogen/skipUic.cpp @@ -0,0 +1,22 @@ + +#include "skipSource/skipUicGen.hpp" +#include "skipSource/skipUicNoGen1.hpp" +#include "skipSource/skipUicNoGen2.hpp" + +int main(int, char**) +{ + skipGen(); + skipNoGen1(); + skipNoGen2(); + + return 0; +} + +// -- Function definitions +void ui_nogen1() +{ +} + +void ui_nogen2() +{ +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8dbdd3e726ead25c179e6eb4ffab212a1db3aba8 commit 8dbdd3e726ead25c179e6eb4ffab212a1db3aba8 Author: Sebastian Holtermann AuthorDate: Sat Dec 31 10:25:38 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Tests: AUTOMOC SKIP_AUTOMOC and SKIP_AUTOGEN test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 6d4e2c4..068b037 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -139,6 +139,28 @@ if (automoc_rerun_result) message(SEND_ERROR "Second build of automoc_rerun failed.") endif() +# -- Test: AUTOMOC, SKIP_AUTOMOC +# Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target +qtx_wrap_cpp(skipMocWrapMoc + skipSource/qItemA.hpp + skipSource/qItemB.hpp) +set(skipMocSources + skipMoc.cpp + skipSource/qItemA.cpp + skipSource/qItemB.cpp + skipSource/qItemC.cpp) +set_property(SOURCE skipSource/qItemA.cpp PROPERTY SKIP_AUTOMOC ON) +set_property(SOURCE skipSource/qItemB.cpp PROPERTY SKIP_AUTOGEN ON) +# AUTOMOC enabled only +add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc}) +set_property(TARGET skipMocA PROPERTY AUTOMOC ON) +target_link_libraries(skipMocA ${QT_LIBRARIES}) +# AUTOMOC and AUTOUIC enabled +add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc}) +set_property(TARGET skipMocB PROPERTY AUTOMOC ON) +set_property(TARGET skipMocB PROPERTY AUTOUIC ON) +target_link_libraries(skipMocB ${QT_LIBRARIES}) + # -- Test: AUTOMOC AUTORCC # Source files with the same basename in different subdirectories add_subdirectory(sameName) diff --git a/Tests/QtAutogen/skipMoc.cpp b/Tests/QtAutogen/skipMoc.cpp new file mode 100644 index 0000000..85305f5 --- /dev/null +++ b/Tests/QtAutogen/skipMoc.cpp @@ -0,0 +1,14 @@ + +#include "skipSource/qItemA.hpp" +#include "skipSource/qItemB.hpp" +#include "skipSource/qItemC.hpp" + +int main(int, char**) +{ + QItemA itemA; + QItemA itemB; + QItemA itemC; + + // Fails to link if the symbol is not present. + return 0; +} diff --git a/Tests/QtAutogen/skipSource/qItemA.cpp b/Tests/QtAutogen/skipSource/qItemA.cpp new file mode 100644 index 0000000..522c2c7 --- /dev/null +++ b/Tests/QtAutogen/skipSource/qItemA.cpp @@ -0,0 +1,5 @@ +#include "qItemA.hpp" + +void QItemA::go() +{ +} diff --git a/Tests/QtAutogen/skipSource/qItemA.hpp b/Tests/QtAutogen/skipSource/qItemA.hpp new file mode 100644 index 0000000..d295faf --- /dev/null +++ b/Tests/QtAutogen/skipSource/qItemA.hpp @@ -0,0 +1,13 @@ +#ifndef QITEMA_HPP +#define QITEMA_HPP + +#include + +class QItemA : public QObject +{ + Q_OBJECT + Q_SLOT + void go(); +}; + +#endif diff --git a/Tests/QtAutogen/skipSource/qItemB.cpp b/Tests/QtAutogen/skipSource/qItemB.cpp new file mode 100644 index 0000000..636e15d --- /dev/null +++ b/Tests/QtAutogen/skipSource/qItemB.cpp @@ -0,0 +1,5 @@ +#include "qItemB.hpp" + +void QItemB::go() +{ +} diff --git a/Tests/QtAutogen/skipSource/qItemB.hpp b/Tests/QtAutogen/skipSource/qItemB.hpp new file mode 100644 index 0000000..1775915 --- /dev/null +++ b/Tests/QtAutogen/skipSource/qItemB.hpp @@ -0,0 +1,13 @@ +#ifndef QITEMB_HPP +#define QITEMB_HPP + +#include + +class QItemB : public QObject +{ + Q_OBJECT + Q_SLOT + void go(); +}; + +#endif diff --git a/Tests/QtAutogen/skipSource/qItemC.cpp b/Tests/QtAutogen/skipSource/qItemC.cpp new file mode 100644 index 0000000..700abd6 --- /dev/null +++ b/Tests/QtAutogen/skipSource/qItemC.cpp @@ -0,0 +1,5 @@ +#include "qItemC.hpp" + +void QItemC::go() +{ +} diff --git a/Tests/QtAutogen/skipSource/qItemC.hpp b/Tests/QtAutogen/skipSource/qItemC.hpp new file mode 100644 index 0000000..f06bda2 --- /dev/null +++ b/Tests/QtAutogen/skipSource/qItemC.hpp @@ -0,0 +1,13 @@ +#ifndef QITEMC_HPP +#define QITEMC_HPP + +#include + +class QItemC : public QObject +{ + Q_OBJECT + Q_SLOT + void go(); +}; + +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0699760d5c8b644242ddd4ac6d07d8c4c68f2b94 commit 0699760d5c8b644242ddd4ac6d07d8c4c68f2b94 Author: Sebastian Holtermann AuthorDate: Wed Jan 4 13:32:11 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Generators: Do moc/uic skip test during file list generation diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 0a8c459..f5c33fe 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -534,8 +534,16 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) } // Parse headers - headerFilesMoc.insert(this->Headers.begin(), this->Headers.end()); - headerFilesUic.insert(this->Headers.begin(), this->Headers.end()); + for (std::vector::const_iterator it = this->Headers.begin(); + it != this->Headers.end(); ++it) { + const std::string& headerName = *it; + if (!this->MocSkipTest(headerName)) { + headerFilesMoc.insert(this->Headers.begin(), this->Headers.end()); + } + if (!this->UicSkipTest(headerName)) { + headerFilesUic.insert(this->Headers.begin(), this->Headers.end()); + } + } this->ParseHeaders(headerFilesMoc, headerFilesUic, includedMocs, notIncludedMocs, includedUis); @@ -577,10 +585,12 @@ bool cmQtAutoGenerators::ParseSourceFile( this->LogWarning(err.str()); } else { // Parse source contents for MOC - success = this->ParseContentForMoc( - absFilename, contentsString, headerExtensions, includedMocs, relaxed); + if (success && !this->MocSkipTest(absFilename)) { + success = this->ParseContentForMoc( + absFilename, contentsString, headerExtensions, includedMocs, relaxed); + } // Parse source contents for UIC - if (success) { + if (success && !this->UicSkipTest(absFilename)) { this->ParseContentForUic(absFilename, contentsString, includedUis); } } @@ -610,10 +620,6 @@ void cmQtAutoGenerators::ParseContentForUic( const std::string& absFilename, const std::string& contentsString, std::map >& includedUis) { - if (this->UicSkipTest(absFilename)) { - return; - } - // Process if (this->Verbose) { std::ostringstream err; @@ -644,10 +650,6 @@ bool cmQtAutoGenerators::ParseContentForMoc( const std::vector& headerExtensions, std::map& includedMocs, bool relaxed) { - if (this->MocSkipTest(absFilename)) { - return true; - } - // Process if (this->Verbose) { std::ostringstream err; @@ -895,8 +897,7 @@ void cmQtAutoGenerators::ParseHeaders( const std::string contents = ReadAll(headerName); // Parse header content for MOC - if (!this->MocSkipTest(headerName) && - (absHeadersMoc.find(headerName) != absHeadersMoc.end()) && + if ((absHeadersMoc.find(headerName) != absHeadersMoc.end()) && (includedMocs.find(headerName) == includedMocs.end())) { // Process if (this->Verbose) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a84f0bb726ebcc8e9bf3db0b99e5b6fd8a720045 commit a84f0bb726ebcc8e9bf3db0b99e5b6fd8a720045 Author: Sebastian Holtermann AuthorDate: Wed Jan 4 13:18:23 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Generators: Message upper/lower case unification diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 8fea817..0a8c459 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -198,7 +198,7 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( if (!makefile->ReadListFile(filename.c_str())) { std::ostringstream err; - err << "AUTOGEN: error processing file: " << filename << std::endl; + err << "AutoGen: error processing file: " << filename << std::endl; this->LogError(err.str()); return false; } @@ -328,7 +328,7 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( } if (this->RccSources.size() != rccInputLists.size()) { std::ostringstream err; - err << "AUTOGEN: RCC sources lists size missmatch in: " << filename; + err << "AutoGen: RCC sources lists size missmatch in: " << filename; err << std::endl; this->LogError(err.str()); return false; @@ -572,7 +572,7 @@ bool cmQtAutoGenerators::ParseSourceFile( const std::string contentsString = ReadAll(absFilename); if (contentsString.empty()) { std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename << "\n" + err << "AutoGen: Warning: " << absFilename << "\n" << "The file is empty\n"; this->LogWarning(err.str()); } else { @@ -617,7 +617,7 @@ void cmQtAutoGenerators::ParseContentForUic( // Process if (this->Verbose) { std::ostringstream err; - err << "AUTOUIC: Checking " << absFilename << "\n"; + err << "AutoUic: Checking " << absFilename << "\n"; this->LogInfo(err.str()); } @@ -651,7 +651,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( // Process if (this->Verbose) { std::ostringstream err; - err << "AUTOMOC: Checking " << absFilename << "\n"; + err << "AutoMoc: Checking " << absFilename << "\n"; this->LogInfo(err.str()); } @@ -705,7 +705,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( } } else { std::ostringstream err; - err << "AUTOMOC: error: " << absFilename << "\n" + err << "AutoMoc: Error: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\", but could not find header \"" << basename << '{' << this->JoinExts(headerExtensions) << "}\" "; @@ -733,7 +733,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( fileToMoc = headerToMoc; if (!requiresMoc && basename == scannedFileBasename) { std::ostringstream err; - err << "AUTOMOC: warning: " << absFilename << "\n" + err << "AutoMoc: Warning: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\", but does not contain a " << macroName << " macro. Running moc on " @@ -743,7 +743,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( this->LogWarning(err.str()); } else { std::ostringstream err; - err << "AUTOMOC: warning: " << absFilename << "\n" + err << "AutoMoc: Warning: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\" instead of \"moc_" << basename << ".cpp\". Running moc on " @@ -754,7 +754,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( } } else { std::ostringstream err; - err << "AUTOMOC: error: " << absFilename << "\n" + err << "AutoMoc: Error: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\", which seems to be the moc file from a different " "source file. CMake also could not find a matching " @@ -772,7 +772,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( if (basename != scannedFileBasename) { // Don't allow FOO.moc include other than self in strict mode std::ostringstream err; - err << "AUTOMOC: error: " << absFilename << "\n" + err << "AutoMoc: Error: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\", which seems to be the moc file from a different " "source file. This is not supported. Include \"" @@ -803,7 +803,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( if (relaxed && ownMocUnderscoreIncluded) { // This is for KDE4 compatibility: std::ostringstream err; - err << "AUTOMOC: warning: " << absFilename << "\n" + err << "AutoMoc: Warning: " << absFilename << "\n" << "The file contains a " << macroName << " macro, but does not include " << "\"" << scannedFileBasename << ".moc\", but instead includes " @@ -820,7 +820,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( } else { // Otherwise always error out since it will not compile: std::ostringstream err; - err << "AUTOMOC: error: " << absFilename << "\n" + err << "AutoMoc: Error: " << absFilename << "\n" << "The file contains a " << macroName << " macro, but does not include " << "\"" << scannedFileBasename << ".moc\" !\n"; @@ -901,7 +901,7 @@ void cmQtAutoGenerators::ParseHeaders( // Process if (this->Verbose) { std::ostringstream err; - err << "AUTOMOC: Checking " << headerName << "\n"; + err << "AutoMoc: Checking " << headerName << "\n"; this->LogInfo(err.str()); } std::string macroName; @@ -932,7 +932,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( mergedMocs.insert(notIncludedMocs.begin(), notIncludedMocs.end()); if (this->NameCollisionTest(mergedMocs, collisions)) { std::ostringstream err; - err << "AUTOMOC: error: " + err << "AutoMoc: Error: " "The same moc file will be generated " "from different sources." << std::endl @@ -1003,7 +1003,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( // nothing changed: don't touch the moc_compilation.cpp file if (this->Verbose) { std::ostringstream err; - err << "AUTOMOC: " << this->OutMocCppFilenameRel << " still up to date" + err << "AutoMoc: " << this->OutMocCppFilenameRel << " still up to date" << std::endl; this->LogInfo(err.str()); } @@ -1025,7 +1025,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( if (!outfile) { success = false; std::ostringstream err; - err << "AUTOMOC: error opening " << this->OutMocCppFilenameAbs << "\n"; + err << "AutoMoc: error opening " << this->OutMocCppFilenameAbs << "\n"; this->LogError(err.str()); } else { outfile << automocSource; @@ -1033,7 +1033,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( if (!outfile.good()) { success = false; std::ostringstream err; - err << "AUTOMOC: error writing " << this->OutMocCppFilenameAbs << "\n"; + err << "AutoMoc: error writing " << this->OutMocCppFilenameAbs << "\n"; this->LogError(err.str()); } } @@ -1090,7 +1090,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, if (!result || retVal) { { std::ostringstream err; - err << "AUTOMOC: error: moc process for " << mocFileRel << " failed:\n" + err << "AutoMoc: Error: moc process for " << mocFileRel << " failed:\n" << output << std::endl; this->LogError(err.str()); } @@ -1133,7 +1133,7 @@ bool cmQtAutoGenerators::GenerateUiFiles( std::multimap collisions; if (this->NameCollisionTest(testMap, collisions)) { std::ostringstream err; - err << "AUTOUIC: error: The same ui_NAME.h file will be generated " + err << "AutoUic: Error: The same ui_NAME.h file will be generated " "from different sources." << std::endl << "To avoid this error rename the source files." << std::endl; @@ -1214,7 +1214,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, if (!result || retVal) { { std::ostringstream err; - err << "AUTOUIC: error: uic process for " << uicFileRel + err << "AutoUic: Error: uic process for " << uicFileRel << " needed by\n \"" << realName << "\"\nfailed:\n" << output << std::endl; this->LogError(err.str()); @@ -1263,7 +1263,7 @@ bool cmQtAutoGenerators::GenerateQrcFiles() std::multimap collisions; if (this->NameCollisionTest(qrcGenMap, collisions)) { std::ostringstream err; - err << "AUTORCC: error: The same qrc_NAME.cpp file" + err << "AutoRcc: Error: The same qrc_NAME.cpp file" " will be generated from different sources." << std::endl << "To avoid this error rename the source .qrc files." << std::endl; @@ -1350,7 +1350,7 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile, if (!result || retVal) { { std::ostringstream err; - err << "AUTORCC: error: rcc process for " << qrcOutputFile + err << "AutoRcc: Error: rcc process for " << qrcOutputFile << " failed:\n" << output << std::endl; this->LogError(err.str()); @@ -1495,7 +1495,7 @@ bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename) success = cmsys::SystemTools::MakeDirectory(dirName); if (!success) { std::ostringstream err; - err << "AUTOGEN: Directory creation failed: " << dirName << std::endl; + err << "AutoGen: Directory creation failed: " << dirName << std::endl; this->LogError(err.str()); } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b766b83952ec4c431a55d2f6e589a5f806834c9 commit 7b766b83952ec4c431a55d2f6e589a5f806834c9 Author: Sebastian Holtermann AuthorDate: Wed Jan 4 13:08:25 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Generators: Use single moc/uic skip test method only diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 24d2dd7..8fea817 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -610,7 +610,7 @@ void cmQtAutoGenerators::ParseContentForUic( const std::string& absFilename, const std::string& contentsString, std::map >& includedUis) { - if (this->UicExecutable.empty() || this->UicSkipTest(absFilename)) { + if (this->UicSkipTest(absFilename)) { return; } @@ -644,7 +644,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( const std::vector& headerExtensions, std::map& includedMocs, bool relaxed) { - if (this->MocExecutable.empty() || this->MocSkipTest(absFilename)) { + if (this->MocSkipTest(absFilename)) { return true; } @@ -838,25 +838,22 @@ void cmQtAutoGenerators::SearchHeadersForSourceFile( std::set& absHeadersMoc, std::set& absHeadersUic) { // search for header files and private header files we may need to moc: - const std::string basename = - cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); - const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename)) + - '/'; + std::string basepath = cmsys::SystemTools::GetFilenamePath( + cmsys::SystemTools::GetRealPath(absFilename)); + basepath += '/'; + basepath += cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); // Search for regular header for (std::vector::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { - const std::string headerName = absPath + basename + "." + (*ext); + const std::string headerName = basepath + "." + (*ext); if (cmsys::SystemTools::FileExists(headerName.c_str())) { // Moc headers - if (!this->MocExecutable.empty() && - !ListContains(this->SkipMoc, absFilename)) { + if (!this->MocSkipTest(absFilename) && !this->MocSkipTest(headerName)) { absHeadersMoc.insert(headerName); } // Uic headers - if (!this->UicExecutable.empty() && - !ListContains(this->SkipUic, absFilename)) { + if (!this->UicSkipTest(absFilename) && !this->UicSkipTest(headerName)) { absHeadersUic.insert(headerName); } break; @@ -865,17 +862,15 @@ void cmQtAutoGenerators::SearchHeadersForSourceFile( // Search for private header for (std::vector::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { - const std::string privateHeaderName = absPath + basename + "_p." + (*ext); - if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) { + const std::string headerName = basepath + "_p." + (*ext); + if (cmsys::SystemTools::FileExists(headerName.c_str())) { // Moc headers - if (!this->MocExecutable.empty() && - !ListContains(this->SkipMoc, absFilename)) { - absHeadersMoc.insert(privateHeaderName); + if (!this->MocSkipTest(absFilename) && !this->MocSkipTest(headerName)) { + absHeadersMoc.insert(headerName); } // Uic headers - if (!this->UicExecutable.empty() && - !ListContains(this->SkipUic, absFilename)) { - absHeadersUic.insert(privateHeaderName); + if (!this->UicSkipTest(absFilename) && !this->UicSkipTest(headerName)) { + absHeadersUic.insert(headerName); } break; } @@ -900,23 +895,21 @@ void cmQtAutoGenerators::ParseHeaders( const std::string contents = ReadAll(headerName); // Parse header content for MOC - if (!this->MocExecutable.empty() && + if (!this->MocSkipTest(headerName) && (absHeadersMoc.find(headerName) != absHeadersMoc.end()) && (includedMocs.find(headerName) == includedMocs.end())) { - if (!this->MocSkipTest(headerName)) { - // Process - if (this->Verbose) { - std::ostringstream err; - err << "AUTOMOC: Checking " << headerName << "\n"; - this->LogInfo(err.str()); - } - std::string macroName; - if (this->requiresMocing(contents, macroName)) { - notIncludedMocs[headerName] = fpathCheckSum.getPart(headerName) + - "/moc_" + - cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName) + - ".cpp"; - } + // Process + if (this->Verbose) { + std::ostringstream err; + err << "AUTOMOC: Checking " << headerName << "\n"; + this->LogInfo(err.str()); + } + std::string macroName; + if (this->requiresMocing(contents, macroName)) { + notIncludedMocs[headerName] = fpathCheckSum.getPart(headerName) + + "/moc_" + + cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName) + + ".cpp"; } } @@ -1372,19 +1365,19 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile, } /** - * @brief Tests if the file name is in the skip list + * @brief Tests if the file should be ignored for moc scanning + * @return True if the file should be ignored */ bool cmQtAutoGenerators::MocSkipTest(const std::string& absFilename) { - if (ListContains(this->SkipMoc, absFilename)) { - if (this->Verbose) { - std::ostringstream msg; - msg << "AUTOMOC: Skipping " << absFilename << "\n"; - this->LogInfo(msg.str()); + // Test if moc scanning is enabled + if (!this->MocExecutable.empty()) { + // Test if the file name is on the skip list + if (!ListContains(this->SkipMoc, absFilename)) { + return false; } - return true; } - return false; + return true; } /** @@ -1392,15 +1385,14 @@ bool cmQtAutoGenerators::MocSkipTest(const std::string& absFilename) */ bool cmQtAutoGenerators::UicSkipTest(const std::string& absFilename) { - if (ListContains(this->SkipUic, absFilename)) { - if (this->Verbose) { - std::ostringstream msg; - msg << "AUTOUIC: Skipping " << absFilename << "\n"; - this->LogInfo(msg.str()); + // Test if uic scanning is enabled + if (!this->UicExecutable.empty()) { + // Test if the file name is on the skip list + if (!ListContains(this->SkipUic, absFilename)) { + return false; } - return true; } - return false; + return true; } /** https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2964b8cca4155fa318722f6ef17f0d4d56ee2f29 commit 2964b8cca4155fa318722f6ef17f0d4d56ee2f29 Author: Sebastian Holtermann AuthorDate: Sun Jan 1 16:10:49 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Generators: Use AUTOMOC/UIC/RCC instead of AUTOGEN in messages diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 9c8594b..24d2dd7 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -705,7 +705,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( } } else { std::ostringstream err; - err << "AUTOGEN: error: " << absFilename << "\n" + err << "AUTOMOC: error: " << absFilename << "\n" << "The file includes the moc file \"" << currentMoc << "\", but could not find header \"" << basename << '{' << this->JoinExts(headerExtensions) << "}\" "; @@ -939,7 +939,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( mergedMocs.insert(notIncludedMocs.begin(), notIncludedMocs.end()); if (this->NameCollisionTest(mergedMocs, collisions)) { std::ostringstream err; - err << "AUTOGEN: error: " + err << "AUTOMOC: error: " "The same moc file will be generated " "from different sources." << std::endl @@ -1010,7 +1010,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( // nothing changed: don't touch the moc_compilation.cpp file if (this->Verbose) { std::ostringstream err; - err << "AUTOGEN: " << this->OutMocCppFilenameRel << " still up to date" + err << "AUTOMOC: " << this->OutMocCppFilenameRel << " still up to date" << std::endl; this->LogInfo(err.str()); } @@ -1032,7 +1032,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( if (!outfile) { success = false; std::ostringstream err; - err << "AUTOGEN: error opening " << this->OutMocCppFilenameAbs << "\n"; + err << "AUTOMOC: error opening " << this->OutMocCppFilenameAbs << "\n"; this->LogError(err.str()); } else { outfile << automocSource; @@ -1040,7 +1040,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( if (!outfile.good()) { success = false; std::ostringstream err; - err << "AUTOGEN: error writing " << this->OutMocCppFilenameAbs << "\n"; + err << "AUTOMOC: error writing " << this->OutMocCppFilenameAbs << "\n"; this->LogError(err.str()); } } @@ -1097,7 +1097,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, if (!result || retVal) { { std::ostringstream err; - err << "AUTOGEN: error: moc process for " << mocFileRel << " failed:\n" + err << "AUTOMOC: error: moc process for " << mocFileRel << " failed:\n" << output << std::endl; this->LogError(err.str()); } @@ -1140,7 +1140,7 @@ bool cmQtAutoGenerators::GenerateUiFiles( std::multimap collisions; if (this->NameCollisionTest(testMap, collisions)) { std::ostringstream err; - err << "AUTOGEN: error: The same ui_NAME.h file will be generated " + err << "AUTOUIC: error: The same ui_NAME.h file will be generated " "from different sources." << std::endl << "To avoid this error rename the source files." << std::endl; @@ -1270,7 +1270,7 @@ bool cmQtAutoGenerators::GenerateQrcFiles() std::multimap collisions; if (this->NameCollisionTest(qrcGenMap, collisions)) { std::ostringstream err; - err << "AUTOGEN: error: The same qrc_NAME.cpp file" + err << "AUTORCC: error: The same qrc_NAME.cpp file" " will be generated from different sources." << std::endl << "To avoid this error rename the source .qrc files." << std::endl; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d58b6bf31c18cfedd4a2f15e009b8e5cbdc21b6e commit d58b6bf31c18cfedd4a2f15e009b8e5cbdc21b6e Author: Sebastian Holtermann AuthorDate: Sun Jan 1 15:58:34 2017 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Generators: Moc/UicSkipTest methods diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index fac9d54..9c8594b 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -610,16 +610,7 @@ void cmQtAutoGenerators::ParseContentForUic( const std::string& absFilename, const std::string& contentsString, std::map >& includedUis) { - if (this->UicExecutable.empty()) { - return; - } - // Check skip list - if (ListContains(this->SkipUic, absFilename)) { - if (this->Verbose) { - std::ostringstream err; - err << "AUTOUIC: Skipping " << absFilename << "\n"; - this->LogInfo(err.str()); - } + if (this->UicExecutable.empty() || this->UicSkipTest(absFilename)) { return; } @@ -653,16 +644,7 @@ bool cmQtAutoGenerators::ParseContentForMoc( const std::vector& headerExtensions, std::map& includedMocs, bool relaxed) { - if (this->MocExecutable.empty()) { - return true; - } - // Check skip list - if (ListContains(this->SkipMoc, absFilename)) { - if (this->Verbose) { - std::ostringstream err; - err << "AUTOMOC: Skipping " << absFilename << "\n"; - this->LogInfo(err.str()); - } + if (this->MocExecutable.empty() || this->MocSkipTest(absFilename)) { return true; } @@ -921,14 +903,7 @@ void cmQtAutoGenerators::ParseHeaders( if (!this->MocExecutable.empty() && (absHeadersMoc.find(headerName) != absHeadersMoc.end()) && (includedMocs.find(headerName) == includedMocs.end())) { - if (ListContains(this->SkipMoc, headerName)) { - // Skip - if (this->Verbose) { - std::ostringstream err; - err << "AUTOMOC: Skipping " << headerName << "\n"; - this->LogInfo(err.str()); - } - } else { + if (!this->MocSkipTest(headerName)) { // Process if (this->Verbose) { std::ostringstream err; @@ -1397,6 +1372,38 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile, } /** + * @brief Tests if the file name is in the skip list + */ +bool cmQtAutoGenerators::MocSkipTest(const std::string& absFilename) +{ + if (ListContains(this->SkipMoc, absFilename)) { + if (this->Verbose) { + std::ostringstream msg; + msg << "AUTOMOC: Skipping " << absFilename << "\n"; + this->LogInfo(msg.str()); + } + return true; + } + return false; +} + +/** + * @brief Tests if the file name is in the skip list + */ +bool cmQtAutoGenerators::UicSkipTest(const std::string& absFilename) +{ + if (ListContains(this->SkipUic, absFilename)) { + if (this->Verbose) { + std::ostringstream msg; + msg << "AUTOUIC: Skipping " << absFilename << "\n"; + this->LogInfo(msg.str()); + } + return true; + } + return false; +} + +/** * @brief Collects name collisions as output/input pairs * @return True if there were collisions */ diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index 1036cb7..d0c7066 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -86,6 +86,9 @@ private: void Init(); + bool MocSkipTest(const std::string& absFilename); + bool UicSkipTest(const std::string& absFilename); + bool NameCollisionTest(const std::map& genFiles, std::multimap& collisions); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94c319f93309ff4cddd0280cdcbd48b50492db36 commit 94c319f93309ff4cddd0280cdcbd48b50492db36 Author: Sebastian Holtermann AuthorDate: Sat Dec 31 13:04:38 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:16 2017 +0100 AUTOGEN: Generators: Use separate header lists for MOC and UIC This is necessary for the skipMoc and skipUic lists to work properly. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index b323609..fac9d54 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -511,7 +511,8 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) std::map notIncludedMocs; std::map > includedUis; // collects all headers which may need to be mocced - std::set headerFiles; + std::set headerFilesMoc; + std::set headerFilesUic; // Parse sources { @@ -527,14 +528,16 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) return false; } // Find additional headers - this->SearchHeadersForCppFile(absFilename, headerExtensions, - headerFiles); + this->SearchHeadersForSourceFile(absFilename, headerExtensions, + headerFilesMoc, headerFilesUic); } } // Parse headers - headerFiles.insert(this->Headers.begin(), this->Headers.end()); - this->ParseHeaders(headerFiles, includedMocs, notIncludedMocs, includedUis); + headerFilesMoc.insert(this->Headers.begin(), this->Headers.end()); + headerFilesUic.insert(this->Headers.begin(), this->Headers.end()); + this->ParseHeaders(headerFilesMoc, headerFilesUic, includedMocs, + notIncludedMocs, includedUis); // Generate files if (!this->MocExecutable.empty()) { @@ -847,10 +850,10 @@ bool cmQtAutoGenerators::ParseContentForMoc( return true; } -void cmQtAutoGenerators::SearchHeadersForCppFile( +void cmQtAutoGenerators::SearchHeadersForSourceFile( const std::string& absFilename, const std::vector& headerExtensions, - std::set& absHeaders) + std::set& absHeadersMoc, std::set& absHeadersUic) { // search for header files and private header files we may need to moc: const std::string basename = @@ -859,37 +862,64 @@ void cmQtAutoGenerators::SearchHeadersForCppFile( cmsys::SystemTools::GetRealPath(absFilename)) + '/'; + // Search for regular header for (std::vector::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { const std::string headerName = absPath + basename + "." + (*ext); if (cmsys::SystemTools::FileExists(headerName.c_str())) { - absHeaders.insert(headerName); + // Moc headers + if (!this->MocExecutable.empty() && + !ListContains(this->SkipMoc, absFilename)) { + absHeadersMoc.insert(headerName); + } + // Uic headers + if (!this->UicExecutable.empty() && + !ListContains(this->SkipUic, absFilename)) { + absHeadersUic.insert(headerName); + } break; } } + // Search for private header for (std::vector::const_iterator ext = headerExtensions.begin(); ext != headerExtensions.end(); ++ext) { const std::string privateHeaderName = absPath + basename + "_p." + (*ext); if (cmsys::SystemTools::FileExists(privateHeaderName.c_str())) { - absHeaders.insert(privateHeaderName); + // Moc headers + if (!this->MocExecutable.empty() && + !ListContains(this->SkipMoc, absFilename)) { + absHeadersMoc.insert(privateHeaderName); + } + // Uic headers + if (!this->UicExecutable.empty() && + !ListContains(this->SkipUic, absFilename)) { + absHeadersUic.insert(privateHeaderName); + } break; } } } void cmQtAutoGenerators::ParseHeaders( - const std::set& absHeaders, + const std::set& absHeadersMoc, + const std::set& absHeadersUic, const std::map& includedMocs, std::map& notIncludedMocs, std::map >& includedUis) { - for (std::set::const_iterator hIt = absHeaders.begin(); - hIt != absHeaders.end(); ++hIt) { + // Merged header files list to read files only once + std::set headerFiles; + headerFiles.insert(absHeadersMoc.begin(), absHeadersMoc.end()); + headerFiles.insert(absHeadersUic.begin(), absHeadersUic.end()); + + for (std::set::const_iterator hIt = headerFiles.begin(); + hIt != headerFiles.end(); ++hIt) { const std::string& headerName = *hIt; const std::string contents = ReadAll(headerName); // Parse header content for MOC if (!this->MocExecutable.empty() && + (absHeadersMoc.find(headerName) != absHeadersMoc.end()) && (includedMocs.find(headerName) == includedMocs.end())) { if (ListContains(this->SkipMoc, headerName)) { // Skip @@ -916,7 +946,9 @@ void cmQtAutoGenerators::ParseHeaders( } // Parse header content for UIC - this->ParseContentForUic(headerName, contents, includedUis); + if (absHeadersUic.find(headerName) != absHeadersUic.end()) { + this->ParseContentForUic(headerName, contents, includedUis); + } } } diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index dac23d9..1036cb7 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -55,13 +55,15 @@ private: std::map& includedMocs, std::map >& includedUis, bool relaxed); - void SearchHeadersForCppFile( + void SearchHeadersForSourceFile( const std::string& absFilename, const std::vector& headerExtensions, - std::set& absHeaders); + std::set& absHeadersMoc, + std::set& absHeadersUic); void ParseHeaders( - const std::set& absHeaders, + const std::set& absHeadersMoc, + const std::set& absHeadersUic, const std::map& includedMocs, std::map& notIncludedMocs, std::map >& includedUis); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=966be439e07131c3ff84175c1a9e3b6336908d8e commit 966be439e07131c3ff84175c1a9e3b6336908d8e Author: Sebastian Holtermann AuthorDate: Sat Dec 31 11:51:39 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Generators: Be verbose about skipping files diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index c162c87..b323609 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -607,11 +607,20 @@ void cmQtAutoGenerators::ParseContentForUic( const std::string& absFilename, const std::string& contentsString, std::map >& includedUis) { - if (this->UicExecutable.empty() || - ListContains(this->SkipUic, absFilename)) { + if (this->UicExecutable.empty()) { + return; + } + // Check skip list + if (ListContains(this->SkipUic, absFilename)) { + if (this->Verbose) { + std::ostringstream err; + err << "AUTOUIC: Skipping " << absFilename << "\n"; + this->LogInfo(err.str()); + } return; } + // Process if (this->Verbose) { std::ostringstream err; err << "AUTOUIC: Checking " << absFilename << "\n"; @@ -641,11 +650,20 @@ bool cmQtAutoGenerators::ParseContentForMoc( const std::vector& headerExtensions, std::map& includedMocs, bool relaxed) { - if (this->MocExecutable.empty() || - ListContains(this->SkipMoc, absFilename)) { + if (this->MocExecutable.empty()) { + return true; + } + // Check skip list + if (ListContains(this->SkipMoc, absFilename)) { + if (this->Verbose) { + std::ostringstream err; + err << "AUTOMOC: Skipping " << absFilename << "\n"; + this->LogInfo(err.str()); + } return true; } + // Process if (this->Verbose) { std::ostringstream err; err << "AUTOMOC: Checking " << absFilename << "\n"; @@ -872,21 +890,28 @@ void cmQtAutoGenerators::ParseHeaders( // Parse header content for MOC if (!this->MocExecutable.empty() && - !ListContains(this->SkipMoc, headerName) && (includedMocs.find(headerName) == includedMocs.end())) { - - if (this->Verbose) { - std::ostringstream err; - err << "AUTOMOC: Checking " << headerName << "\n"; - this->LogInfo(err.str()); - } - - std::string macroName; - if (this->requiresMocing(contents, macroName)) { - notIncludedMocs[headerName] = fpathCheckSum.getPart(headerName) + - "/moc_" + - cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName) + - ".cpp"; + if (ListContains(this->SkipMoc, headerName)) { + // Skip + if (this->Verbose) { + std::ostringstream err; + err << "AUTOMOC: Skipping " << headerName << "\n"; + this->LogInfo(err.str()); + } + } else { + // Process + if (this->Verbose) { + std::ostringstream err; + err << "AUTOMOC: Checking " << headerName << "\n"; + this->LogInfo(err.str()); + } + std::string macroName; + if (this->requiresMocing(contents, macroName)) { + notIncludedMocs[headerName] = fpathCheckSum.getPart(headerName) + + "/moc_" + + cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName) + + ".cpp"; + } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de531432887487943dbe4ae5a1bde762d5582e06 commit de531432887487943dbe4ae5a1bde762d5582e06 Author: Sebastian Holtermann AuthorDate: Thu Dec 29 17:16:12 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Generators: Remove unused variable diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 4b5e113..c162c87 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -666,13 +666,12 @@ bool cmQtAutoGenerators::ParseContentForMoc( std::string ownMocUnderscoreFile; std::string ownMocHeaderFile; - std::string::size_type matchOffset = 0; // first a simple string check for "moc" is *much* faster than the regexp, // and if the string search already fails, we don't have to try the // expensive regexp - if (strstr(contentsString.c_str(), "moc") != CM_NULLPTR) { + const char* contentChars = contentsString.c_str(); + if (strstr(contentChars, "moc") != CM_NULLPTR) { // Iterate over all included moc files - const char* contentChars = contentsString.c_str(); while (this->RegExpMocInclude.find(contentChars)) { const std::string currentMoc = this->RegExpMocInclude.match(1); // Basename of the current moc include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8e45536fb3637454cf17a638dcd9fc236e94660 commit d8e45536fb3637454cf17a638dcd9fc236e94660 Author: Sebastian Holtermann AuthorDate: Sat Dec 31 11:17:07 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Initializer: Always remember skipped files diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index b74fbf3..6d4c302 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -101,14 +101,17 @@ static std::string GetQtMajorVersion(cmGeneratorTarget const* target) static void SetupSourceFiles(cmGeneratorTarget const* target, std::vector& mocUicSources, std::vector& mocUicHeaders, - std::vector& skipMoc, - std::vector& skipUic) + std::vector& skipMocList, + std::vector& skipUicList) { cmMakefile* makefile = target->Target->GetMakefile(); std::vector srcFiles; target->GetConfigCommonSourceFiles(srcFiles); + const bool targetMoc = target->GetPropertyAsBool("AUTOMOC"); + const bool targetUic = target->GetPropertyAsBool("AUTOUIC"); + cmFilePathChecksum fpathCheckSum(makefile); for (std::vector::const_iterator fileIt = srcFiles.begin(); fileIt != srcFiles.end(); ++fileIt) { @@ -123,32 +126,38 @@ static void SetupSourceFiles(cmGeneratorTarget const* target, if (cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) { continue; } - if (cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOGEN"))) { - continue; - } - const bool fileSkipUic = - cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC")); - const bool fileSkipMoc = - cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC")); - if (fileSkipUic && fileSkipMoc) { - continue; - } - - // Use file const std::string absFile = cmsys::SystemTools::GetRealPath(sf->GetFullPath()); - // Add file name to sources or headers list - if (fileType == cmSystemTools::CXX_FILE_FORMAT) { - mocUicSources.push_back(absFile); - } else if (fileType == cmSystemTools::HEADER_FILE_FORMAT) { - mocUicHeaders.push_back(absFile); - } - // Add file name to skip lists on demand - if (fileSkipUic) { - skipUic.push_back(absFile); - } - if (fileSkipMoc) { - skipMoc.push_back(absFile); + // Skip flags + const bool skipAll = + cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOGEN")); + const bool skipMoc = + skipAll || cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC")); + const bool skipUic = + skipAll || cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC")); + // Add file name to skip lists. + // Do this even when the file is not added to the sources/headers lists + // because the file name may be extracted from an other file when + // processing + if (skipMoc) { + skipMocList.push_back(absFile); + } + if (skipUic) { + skipUicList.push_back(absFile); + } + + if ((targetMoc && !skipMoc) || (targetUic && !skipUic)) { + // Add file name to sources or headers list + switch (fileType) { + case cmSystemTools::CXX_FILE_FORMAT: + mocUicSources.push_back(absFile); + break; + case cmSystemTools::HEADER_FILE_FORMAT: + mocUicHeaders.push_back(absFile); + break; + default: + break; + } } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9313a82906ced0ff3c76828e86d9d7a248a5e49 commit d9313a82906ced0ff3c76828e86d9d7a248a5e49 Author: Sebastian Holtermann AuthorDate: Wed Dec 28 12:15:11 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Initializer: Enable SKIP_AUTOGEN on all AUTOGEN generated sources diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index de0c212..b74fbf3 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -646,7 +646,8 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenSources( cmMakefile* makefile = target->Target->GetMakefile(); const std::string mocCppFile = GetAutogenTargetBuildDir(target) + "moc_compilation.cpp"; - makefile->GetOrCreateSource(mocCppFile, true); + cmSourceFile* gf = makefile->GetOrCreateSource(mocCppFile, true); + gf->SetProperty("SKIP_AUTOGEN", "On"); target->AddSource(mocCppFile); } } @@ -778,7 +779,8 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( rccOutputFile += ".cpp"; // Add rcc output file to origin target sources - makefile->GetOrCreateSource(rccOutputFile, true); + cmSourceFile* gf = makefile->GetOrCreateSource(rccOutputFile, true); + gf->SetProperty("SKIP_AUTOGEN", "On"); target->AddSource(rccOutputFile); // Register rcc output file as generated autogenOutputFiles.push_back(rccOutputFile); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32d3540e090c4a24d55b99c49c094a9cb574c9b3 commit 32d3540e090c4a24d55b99c49c094a9cb574c9b3 Author: Sebastian Holtermann AuthorDate: Wed Dec 28 12:01:31 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Initializer: Introduce SKIP_AUTOGEN checks diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 5304aec..de0c212 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -123,6 +123,9 @@ static void SetupSourceFiles(cmGeneratorTarget const* target, if (cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) { continue; } + if (cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOGEN"))) { + continue; + } const bool fileSkipUic = cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC")); const bool fileSkipMoc = @@ -578,7 +581,9 @@ static void RccSetupAutoTarget(cmGeneratorTarget const* target, std::string ext = sf->GetExtension(); if (ext == "qrc") { std::string absFile = cmsys::SystemTools::GetRealPath(sf->GetFullPath()); - bool skip = cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC")); + const bool skip = + cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOGEN")) || + cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC")); if (!skip) { _rcc_files += sepRccFiles; @@ -756,6 +761,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( fileIt != srcFiles.end(); ++fileIt) { cmSourceFile* sf = *fileIt; if (sf->GetExtension() == "qrc" && + !cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOGEN")) && !cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) { { const std::string absFile = https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7280a7f1743d73cdab41ed709a9e1d0f99b6342 commit e7280a7f1743d73cdab41ed709a9e1d0f99b6342 Author: Sebastian Holtermann AuthorDate: Wed Dec 28 11:56:20 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Rename config variables The new names describe the variables use cases better. diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in index 84b0f4d..3fafaff 100644 --- a/Modules/AutogenInfo.cmake.in +++ b/Modules/AutogenInfo.cmake.in @@ -1,7 +1,7 @@ -set(AM_SOURCES @_cpp_files@ ) -set(AM_SKIP_MOC @_skip_moc@ ) -set(AM_SKIP_UIC @_skip_uic@ ) -set(AM_HEADERS @_moc_headers@ ) +set(AM_SOURCES @_moc_uic_sources@) +set(AM_HEADERS @_moc_uic_headers@) +set(AM_SKIP_MOC @_skip_moc@) +set(AM_SKIP_UIC @_skip_uic@) set(AM_MOC_COMPILE_DEFINITIONS @_moc_compile_defs@) set(AM_MOC_INCLUDES @_moc_incs@) set(AM_MOC_OPTIONS @_moc_options@) diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 0ed43b1..5304aec 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -99,9 +99,9 @@ static std::string GetQtMajorVersion(cmGeneratorTarget const* target) } static void SetupSourceFiles(cmGeneratorTarget const* target, + std::vector& mocUicSources, + std::vector& mocUicHeaders, std::vector& skipMoc, - std::vector& sources, - std::vector& headers, std::vector& skipUic) { cmMakefile* makefile = target->Target->GetMakefile(); @@ -136,9 +136,9 @@ static void SetupSourceFiles(cmGeneratorTarget const* target, cmsys::SystemTools::GetRealPath(sf->GetFullPath()); // Add file name to sources or headers list if (fileType == cmSystemTools::CXX_FILE_FORMAT) { - sources.push_back(absFile); + mocUicSources.push_back(absFile); } else if (fileType == cmSystemTools::HEADER_FILE_FORMAT) { - headers.push_back(absFile); + mocUicHeaders.push_back(absFile); } // Add file name to skip lists on demand if (fileSkipUic) { @@ -171,7 +171,6 @@ static void GetCompileDefinitionsAndDirectories( static void MocSetupAutoTarget( cmGeneratorTarget const* target, const std::string& autogenTargetName, std::vector const& skipMoc, - std::vector const& mocHeaders, std::map& configIncludes, std::map& configDefines) { @@ -185,9 +184,6 @@ static void MocSetupAutoTarget( makefile->AddDefinition( "_skip_moc", cmOutputConverter::EscapeForCMake(cmJoin(skipMoc, ";")).c_str()); - makefile->AddDefinition( - "_moc_headers", - cmOutputConverter::EscapeForCMake(cmJoin(mocHeaders, ";")).c_str()); bool relaxedMode = makefile->IsOn("CMAKE_AUTOMOC_RELAXED_MODE"); makefile->AddDefinition("_moc_relaxed_mode", relaxedMode ? "TRUE" : "FALSE"); @@ -863,10 +859,10 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget( cmOutputConverter::EscapeForCMake(target->GetName()).c_str()); makefile->AddDefinition("_target_qt_version", qtMajorVersion.c_str()); - std::vector skipUic; + std::vector mocUicSources; + std::vector mocUicHeaders; std::vector skipMoc; - std::vector mocSources; - std::vector mocHeaders; + std::vector skipUic; std::map configMocIncludes; std::map configMocDefines; std::map configUicOptions; @@ -874,14 +870,18 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget( if (target->GetPropertyAsBool("AUTOMOC") || target->GetPropertyAsBool("AUTOUIC") || target->GetPropertyAsBool("AUTORCC")) { - SetupSourceFiles(target, skipMoc, mocSources, mocHeaders, skipUic); + SetupSourceFiles(target, mocUicSources, mocUicHeaders, skipMoc, skipUic); } makefile->AddDefinition( - "_cpp_files", - cmOutputConverter::EscapeForCMake(cmJoin(mocSources, ";")).c_str()); + "_moc_uic_sources", + cmOutputConverter::EscapeForCMake(cmJoin(mocUicSources, ";")).c_str()); + makefile->AddDefinition( + "_moc_uic_headers", + cmOutputConverter::EscapeForCMake(cmJoin(mocUicHeaders, ";")).c_str()); + if (target->GetPropertyAsBool("AUTOMOC")) { - MocSetupAutoTarget(target, autogenTargetName, skipMoc, mocHeaders, - configMocIncludes, configMocDefines); + MocSetupAutoTarget(target, autogenTargetName, skipMoc, configMocIncludes, + configMocDefines); } if (target->GetPropertyAsBool("AUTOUIC")) { UicSetupAutoTarget(target, skipUic, configUicOptions); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63d3ca4c1cab0c7b9c71d6c051c3b4c053eb7627 commit 63d3ca4c1cab0c7b9c71d6c051c3b4c053eb7627 Author: Sebastian Holtermann AuthorDate: Wed Dec 28 11:43:25 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:15 2017 +0100 AUTOGEN: Make skipMoc and skipUic blacklists behave the same way Before skipMoc was a list of files that were not included in the sources. Now the skipMoc files are added to the sources as well in case they are needed for uic processing. skipMoc becomes a blacklist just like skipUic. diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index f0847b1..0ed43b1 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -100,8 +100,8 @@ static std::string GetQtMajorVersion(cmGeneratorTarget const* target) static void SetupSourceFiles(cmGeneratorTarget const* target, std::vector& skipMoc, - std::vector& mocSources, - std::vector& mocHeaders, + std::vector& sources, + std::vector& headers, std::vector& skipUic) { cmMakefile* makefile = target->Target->GetMakefile(); @@ -113,26 +113,39 @@ static void SetupSourceFiles(cmGeneratorTarget const* target, for (std::vector::const_iterator fileIt = srcFiles.begin(); fileIt != srcFiles.end(); ++fileIt) { cmSourceFile* sf = *fileIt; + const cmSystemTools::FileFormat fileType = + cmSystemTools::GetFileFormat(sf->GetExtension().c_str()); + + if (!(fileType == cmSystemTools::CXX_FILE_FORMAT) && + !(fileType == cmSystemTools::HEADER_FILE_FORMAT)) { + continue; + } + if (cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) { + continue; + } + const bool fileSkipUic = + cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC")); + const bool fileSkipMoc = + cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC")); + if (fileSkipUic && fileSkipMoc) { + continue; + } + + // Use file const std::string absFile = cmsys::SystemTools::GetRealPath(sf->GetFullPath()); - const std::string ext = sf->GetExtension(); - - if (cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC"))) { + // Add file name to sources or headers list + if (fileType == cmSystemTools::CXX_FILE_FORMAT) { + sources.push_back(absFile); + } else if (fileType == cmSystemTools::HEADER_FILE_FORMAT) { + headers.push_back(absFile); + } + // Add file name to skip lists on demand + if (fileSkipUic) { skipUic.push_back(absFile); } - - if (!cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) { - if (cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC"))) { - skipMoc.push_back(absFile); - } else { - cmSystemTools::FileFormat fileType = - cmSystemTools::GetFileFormat(ext.c_str()); - if (fileType == cmSystemTools::CXX_FILE_FORMAT) { - mocSources.push_back(absFile); - } else if (fileType == cmSystemTools::HEADER_FILE_FORMAT) { - mocHeaders.push_back(absFile); - } - } + if (fileSkipMoc) { + skipMoc.push_back(absFile); } } } diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 5877619..4b5e113 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -89,6 +89,12 @@ static std::string ReadAll(const std::string& filename) return stream.str(); } +static bool ListContains(const std::vector& list, + const std::string& entry) +{ + return (std::find(list.begin(), list.end(), entry) != list.end()); +} + cmQtAutoGenerators::cmQtAutoGenerators() : Verbose(cmsys::SystemTools::HasEnv("VERBOSE")) , ColorOutput(true) @@ -502,56 +508,35 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) // key = moc source filepath, value = moc output filepath std::map includedMocs; - // collect all headers which may need to be mocced + std::map notIncludedMocs; + std::map > includedUis; + // collects all headers which may need to be mocced std::set headerFiles; - const std::vector& headerExtensions = - makefile->GetCMakeInstance()->GetHeaderExtensions(); - - std::map > includedUis; - std::map > skippedUis; - - for (std::vector::const_iterator it = this->Sources.begin(); - it != this->Sources.end(); ++it) { - const std::string& absFilename = *it; - const bool skipUic = std::find(this->SkipUic.begin(), this->SkipUic.end(), - absFilename) != this->SkipUic.end(); - std::map >& uiFiles = - skipUic ? skippedUis : includedUis; - if (this->Verbose) { - std::ostringstream err; - err << "AUTOGEN: Checking " << absFilename << std::endl; - this->LogInfo(err.str()); - } - // Parse source file for MOC/UIC - if (!this->ParseSourceFile(absFilename, headerExtensions, includedMocs, - uiFiles, this->MocRelaxedMode)) { - return false; - } - // Find additional headers - this->SearchHeadersForCppFile(absFilename, headerExtensions, headerFiles); - } + // Parse sources + { + const std::vector& headerExtensions = + makefile->GetCMakeInstance()->GetHeaderExtensions(); - for (std::vector::const_iterator it = this->SkipMoc.begin(); - it != this->SkipMoc.end(); ++it) { - if (std::find(this->SkipUic.begin(), this->SkipUic.end(), *it) != - this->SkipUic.end()) { + for (std::vector::const_iterator it = this->Sources.begin(); + it != this->Sources.end(); ++it) { const std::string& absFilename = *it; - if (this->Verbose) { - std::ostringstream err; - err << "AUTOGEN: Checking " << absFilename << std::endl; - this->LogInfo(err.str()); + // Parse source file for MOC/UIC + if (!this->ParseSourceFile(absFilename, headerExtensions, includedMocs, + includedUis, this->MocRelaxedMode)) { + return false; } - this->ParseForUic(absFilename, includedUis); + // Find additional headers + this->SearchHeadersForCppFile(absFilename, headerExtensions, + headerFiles); } } + // Parse headers headerFiles.insert(this->Headers.begin(), this->Headers.end()); - - // key = moc source filepath, value = moc output filename - std::map notIncludedMocs; this->ParseHeaders(headerFiles, includedMocs, notIncludedMocs, includedUis); + // Generate files if (!this->MocExecutable.empty()) { if (!this->GenerateMocFiles(includedMocs, notIncludedMocs)) { return false; @@ -588,11 +573,13 @@ bool cmQtAutoGenerators::ParseSourceFile( << "The file is empty\n"; this->LogWarning(err.str()); } else { - // Parse source contents for UIC - this->ParseContentForUic(absFilename, contentsString, includedUis); // Parse source contents for MOC success = this->ParseContentForMoc( absFilename, contentsString, headerExtensions, includedMocs, relaxed); + // Parse source contents for UIC + if (success) { + this->ParseContentForUic(absFilename, contentsString, includedUis); + } } return success; } @@ -616,31 +603,21 @@ bool cmQtAutoGenerators::requiresMocing(const std::string& text, return false; } -void cmQtAutoGenerators::ParseForUic( - const std::string& absFilename, +void cmQtAutoGenerators::ParseContentForUic( + const std::string& absFilename, const std::string& contentsString, std::map >& includedUis) { - if (this->UicExecutable.empty()) { + if (this->UicExecutable.empty() || + ListContains(this->SkipUic, absFilename)) { return; } - const std::string contentsString = ReadAll(absFilename); - if (contentsString.empty()) { + + if (this->Verbose) { std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename << ": file is empty\n" - << std::endl; - this->LogWarning(err.str()); - return; + err << "AUTOUIC: Checking " << absFilename << "\n"; + this->LogInfo(err.str()); } - this->ParseContentForUic(absFilename, contentsString, includedUis); -} -void cmQtAutoGenerators::ParseContentForUic( - const std::string& absFilename, const std::string& contentsString, - std::map >& includedUis) -{ - if (this->UicExecutable.empty()) { - return; - } const std::string realName = cmsys::SystemTools::GetRealPath(absFilename); const char* contentChars = contentsString.c_str(); if (strstr(contentChars, "ui_") != CM_NULLPTR) { @@ -664,10 +641,17 @@ bool cmQtAutoGenerators::ParseContentForMoc( const std::vector& headerExtensions, std::map& includedMocs, bool relaxed) { - if (this->MocExecutable.empty()) { + if (this->MocExecutable.empty() || + ListContains(this->SkipMoc, absFilename)) { return true; } + if (this->Verbose) { + std::ostringstream err; + err << "AUTOMOC: Checking " << absFilename << "\n"; + this->LogInfo(err.str()); + } + const std::string scannedFileAbsPath = cmsys::SystemTools::GetFilenamePath( cmsys::SystemTools::GetRealPath(absFilename)) + @@ -887,11 +871,14 @@ void cmQtAutoGenerators::ParseHeaders( const std::string& headerName = *hIt; const std::string contents = ReadAll(headerName); + // Parse header content for MOC if (!this->MocExecutable.empty() && - includedMocs.find(headerName) == includedMocs.end()) { + !ListContains(this->SkipMoc, headerName) && + (includedMocs.find(headerName) == includedMocs.end())) { + if (this->Verbose) { std::ostringstream err; - err << "AUTOGEN: Checking " << headerName << std::endl; + err << "AUTOMOC: Checking " << headerName << "\n"; this->LogInfo(err.str()); } @@ -903,6 +890,8 @@ void cmQtAutoGenerators::ParseHeaders( ".cpp"; } } + + // Parse header content for UIC this->ParseContentForUic(headerName, contents, includedUis); } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ae19bf32e232beb59a0c427d82c0761e8248ab8 commit 6ae19bf32e232beb59a0c427d82c0761e8248ab8 Author: Sebastian Holtermann AuthorDate: Wed Dec 28 10:25:16 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Add dedicated method for moc content parsing diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 33550b0..5877619 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -580,19 +580,90 @@ bool cmQtAutoGenerators::ParseSourceFile( std::map& includedMocs, std::map >& includedUis, bool relaxed) { + bool success = true; const std::string contentsString = ReadAll(absFilename); if (contentsString.empty()) { std::ostringstream err; err << "AUTOGEN: warning: " << absFilename << "\n" << "The file is empty\n"; this->LogWarning(err.str()); - return true; + } else { + // Parse source contents for UIC + this->ParseContentForUic(absFilename, contentsString, includedUis); + // Parse source contents for MOC + success = this->ParseContentForMoc( + absFilename, contentsString, headerExtensions, includedMocs, relaxed); + } + return success; +} + +bool cmQtAutoGenerators::requiresMocing(const std::string& text, + std::string& macroName) +{ + // Run a simple check before an expensive regular expression check + if (strstr(text.c_str(), "Q_OBJECT") != CM_NULLPTR) { + if (this->RegExpQObject.find(text)) { + macroName = "Q_OBJECT"; + return true; + } + } + if (strstr(text.c_str(), "Q_GADGET") != CM_NULLPTR) { + if (this->RegExpQGadget.find(text)) { + macroName = "Q_GADGET"; + return true; + } } + return false; +} - // Parse source contents for UIC +void cmQtAutoGenerators::ParseForUic( + const std::string& absFilename, + std::map >& includedUis) +{ + if (this->UicExecutable.empty()) { + return; + } + const std::string contentsString = ReadAll(absFilename); + if (contentsString.empty()) { + std::ostringstream err; + err << "AUTOGEN: warning: " << absFilename << ": file is empty\n" + << std::endl; + this->LogWarning(err.str()); + return; + } this->ParseContentForUic(absFilename, contentsString, includedUis); +} - // Continue with moc parsing on demand +void cmQtAutoGenerators::ParseContentForUic( + const std::string& absFilename, const std::string& contentsString, + std::map >& includedUis) +{ + if (this->UicExecutable.empty()) { + return; + } + const std::string realName = cmsys::SystemTools::GetRealPath(absFilename); + const char* contentChars = contentsString.c_str(); + if (strstr(contentChars, "ui_") != CM_NULLPTR) { + while (this->RegExpUicInclude.find(contentChars)) { + const std::string currentUi = this->RegExpUicInclude.match(1); + const std::string basename = + cmsys::SystemTools::GetFilenameWithoutLastExtension(currentUi); + // basename should be the part of the ui filename used for + // finding the correct header, so we need to remove the ui_ part + includedUis[realName].push_back(basename.substr(3)); + contentChars += this->RegExpUicInclude.end(); + } + } +} + +/** + * @return True on success + */ +bool cmQtAutoGenerators::ParseContentForMoc( + const std::string& absFilename, const std::string& contentsString, + const std::vector& headerExtensions, + std::map& includedMocs, bool relaxed) +{ if (this->MocExecutable.empty()) { return true; } @@ -775,65 +846,6 @@ bool cmQtAutoGenerators::ParseSourceFile( return true; } -bool cmQtAutoGenerators::requiresMocing(const std::string& text, - std::string& macroName) -{ - // Run a simple check before an expensive regular expression check - if (strstr(text.c_str(), "Q_OBJECT") != CM_NULLPTR) { - if (this->RegExpQObject.find(text)) { - macroName = "Q_OBJECT"; - return true; - } - } - if (strstr(text.c_str(), "Q_GADGET") != CM_NULLPTR) { - if (this->RegExpQGadget.find(text)) { - macroName = "Q_GADGET"; - return true; - } - } - return false; -} - -void cmQtAutoGenerators::ParseForUic( - const std::string& absFilename, - std::map >& includedUis) -{ - if (this->UicExecutable.empty()) { - return; - } - const std::string contentsString = ReadAll(absFilename); - if (contentsString.empty()) { - std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename << ": file is empty\n" - << std::endl; - this->LogWarning(err.str()); - return; - } - this->ParseContentForUic(absFilename, contentsString, includedUis); -} - -void cmQtAutoGenerators::ParseContentForUic( - const std::string& absFilename, const std::string& contentsString, - std::map >& includedUis) -{ - if (this->UicExecutable.empty()) { - return; - } - const std::string realName = cmsys::SystemTools::GetRealPath(absFilename); - const char* contentChars = contentsString.c_str(); - if (strstr(contentChars, "ui_") != CM_NULLPTR) { - while (this->RegExpUicInclude.find(contentChars)) { - const std::string currentUi = this->RegExpUicInclude.match(1); - const std::string basename = - cmsys::SystemTools::GetFilenameWithoutLastExtension(currentUi); - // basename should be the part of the ui filename used for - // finding the correct header, so we need to remove the ui_ part - includedUis[realName].push_back(basename.substr(3)); - contentChars += this->RegExpUicInclude.end(); - } - } -} - void cmQtAutoGenerators::SearchHeadersForCppFile( const std::string& absFilename, const std::vector& headerExtensions, diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index f86e7c3..dac23d9 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -72,6 +72,12 @@ private: const std::string& fileName, const std::string& contentsString, std::map >& includedUis); + bool ParseContentForMoc(const std::string& absFilename, + const std::string& contentsString, + const std::vector& headerExtensions, + std::map& includedMocs, + bool relaxed); + void ParseForUic( const std::string& fileName, std::map >& includedUis); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9986da4f0f2f49c0d7d260f9d21deaa906708376 commit 9986da4f0f2f49c0d7d260f9d21deaa906708376 Author: Sebastian Holtermann AuthorDate: Tue Dec 27 19:08:23 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Split config SKIP_MOC and SKIP_UIC into vectors diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 5a370fe..33550b0 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -227,7 +227,8 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->Headers); // - Moc - this->SkipMoc = makefile->GetSafeDefinition("AM_SKIP_MOC"); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SKIP_MOC"), + this->SkipMoc); { std::string compileDefsPropOrig = "AM_MOC_COMPILE_DEFINITIONS"; std::string compileDefsProp = compileDefsPropOrig; @@ -254,7 +255,8 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->MocOptionsStr = makefile->GetSafeDefinition("AM_MOC_OPTIONS"); // - Uic - this->SkipUic = makefile->GetSafeDefinition("AM_SKIP_UIC"); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SKIP_UIC"), + this->SkipUic); { const char* uicOptionsFiles = makefile->GetSafeDefinition("AM_UIC_OPTIONS_FILES"); @@ -508,14 +510,12 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) std::map > includedUis; std::map > skippedUis; - std::vector uicSkipped; - cmSystemTools::ExpandListArgument(this->SkipUic, uicSkipped); for (std::vector::const_iterator it = this->Sources.begin(); it != this->Sources.end(); ++it) { const std::string& absFilename = *it; - const bool skipUic = std::find(uicSkipped.begin(), uicSkipped.end(), - absFilename) != uicSkipped.end(); + const bool skipUic = std::find(this->SkipUic.begin(), this->SkipUic.end(), + absFilename) != this->SkipUic.end(); std::map >& uiFiles = skipUic ? skippedUis : includedUis; if (this->Verbose) { @@ -532,21 +532,17 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) this->SearchHeadersForCppFile(absFilename, headerExtensions, headerFiles); } - { - std::vector mocSkipped; - cmSystemTools::ExpandListArgument(this->SkipMoc, mocSkipped); - for (std::vector::const_iterator it = mocSkipped.begin(); - it != mocSkipped.end(); ++it) { - if (std::find(uicSkipped.begin(), uicSkipped.end(), *it) != - uicSkipped.end()) { - const std::string& absFilename = *it; - if (this->Verbose) { - std::ostringstream err; - err << "AUTOGEN: Checking " << absFilename << std::endl; - this->LogInfo(err.str()); - } - this->ParseForUic(absFilename, includedUis); + for (std::vector::const_iterator it = this->SkipMoc.begin(); + it != this->SkipMoc.end(); ++it) { + if (std::find(this->SkipUic.begin(), this->SkipUic.end(), *it) != + this->SkipUic.end()) { + const std::string& absFilename = *it; + if (this->Verbose) { + std::ostringstream err; + err << "AUTOGEN: Checking " << absFilename << std::endl; + this->LogInfo(err.str()); } + this->ParseForUic(absFilename, includedUis); } } diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index bffdee2..f86e7c3 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -119,7 +119,7 @@ private: std::vector Sources; std::vector Headers; // - Moc - std::string SkipMoc; + std::vector SkipMoc; std::string MocCompileDefinitionsStr; std::string MocIncludesStr; std::string MocOptionsStr; @@ -129,7 +129,7 @@ private: std::list MocDefinitions; std::vector MocOptions; // - Uic - std::string SkipUic; + std::vector SkipUic; std::vector UicTargetOptions; std::map UicOptions; // - Rcc https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d51cc88e844c78c01c1616e6a2fb102c0682dd00 commit d51cc88e844c78c01c1616e6a2fb102c0682dd00 Author: Sebastian Holtermann AuthorDate: Tue Dec 27 19:03:14 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Split config headers/sources into vector diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index f2f1505..5a370fe 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -221,8 +221,10 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->RccExecutable = makefile->GetSafeDefinition("AM_QT_RCC_EXECUTABLE"); // - File Lists - this->Sources = makefile->GetSafeDefinition("AM_SOURCES"); - this->Headers = makefile->GetSafeDefinition("AM_HEADERS"); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SOURCES"), + this->Sources); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_HEADERS"), + this->Headers); // - Moc this->SkipMoc = makefile->GetSafeDefinition("AM_SKIP_MOC"); @@ -501,9 +503,6 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) // collect all headers which may need to be mocced std::set headerFiles; - std::vector sourceFiles; - cmSystemTools::ExpandListArgument(this->Sources, sourceFiles); - const std::vector& headerExtensions = makefile->GetCMakeInstance()->GetHeaderExtensions(); @@ -512,13 +511,13 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) std::vector uicSkipped; cmSystemTools::ExpandListArgument(this->SkipUic, uicSkipped); - for (std::vector::const_iterator it = sourceFiles.begin(); - it != sourceFiles.end(); ++it) { - const bool skipUic = - std::find(uicSkipped.begin(), uicSkipped.end(), *it) != uicSkipped.end(); + for (std::vector::const_iterator it = this->Sources.begin(); + it != this->Sources.end(); ++it) { + const std::string& absFilename = *it; + const bool skipUic = std::find(uicSkipped.begin(), uicSkipped.end(), + absFilename) != uicSkipped.end(); std::map >& uiFiles = skipUic ? skippedUis : includedUis; - const std::string& absFilename = *it; if (this->Verbose) { std::ostringstream err; err << "AUTOGEN: Checking " << absFilename << std::endl; @@ -551,9 +550,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) } } - std::vector headerFilesVec; - cmSystemTools::ExpandListArgument(this->Headers, headerFilesVec); - headerFiles.insert(headerFilesVec.begin(), headerFilesVec.end()); + headerFiles.insert(this->Headers.begin(), this->Headers.end()); // key = moc source filepath, value = moc output filename std::map notIncludedMocs; diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index c6fe3b6..bffdee2 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -116,8 +116,8 @@ private: std::string UicExecutable; std::string RccExecutable; // - File lists - std::string Sources; - std::string Headers; + std::vector Sources; + std::vector Headers; // - Moc std::string SkipMoc; std::string MocCompileDefinitionsStr; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf1d5a9cdba49a2e9f08879d756ae118b22bfc6a commit cf1d5a9cdba49a2e9f08879d756ae118b22bfc6a Author: Sebastian Holtermann AuthorDate: Tue Dec 27 18:55:51 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Rename ParseForUic method diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 561e566..f2f1505 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -597,7 +597,7 @@ bool cmQtAutoGenerators::ParseSourceFile( } // Parse source contents for UIC - this->ParseForUic(absFilename, contentsString, includedUis); + this->ParseContentForUic(absFilename, contentsString, includedUis); // Continue with moc parsing on demand if (this->MocExecutable.empty()) { @@ -816,10 +816,10 @@ void cmQtAutoGenerators::ParseForUic( this->LogWarning(err.str()); return; } - this->ParseForUic(absFilename, contentsString, includedUis); + this->ParseContentForUic(absFilename, contentsString, includedUis); } -void cmQtAutoGenerators::ParseForUic( +void cmQtAutoGenerators::ParseContentForUic( const std::string& absFilename, const std::string& contentsString, std::map >& includedUis) { @@ -898,7 +898,7 @@ void cmQtAutoGenerators::ParseHeaders( ".cpp"; } } - this->ParseForUic(headerName, contents, includedUis); + this->ParseContentForUic(headerName, contents, includedUis); } } diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index b6bca8a..c6fe3b6 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -68,7 +68,7 @@ private: bool requiresMocing(const std::string& text, std::string& macroName); - void ParseForUic( + void ParseContentForUic( const std::string& fileName, const std::string& contentsString, std::map >& includedUis); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f962275987e17cf94da663a919f52b6d0c8f44f4 commit f962275987e17cf94da663a919f52b6d0c8f44f4 Author: Sebastian Holtermann AuthorDate: Tue Dec 27 18:37:30 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Group static function definitions diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 6a7f828..561e566 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -80,6 +80,15 @@ static bool FileNameIsUnique(const std::string& filePath, return true; } +static std::string ReadAll(const std::string& filename) +{ + cmsys::ifstream file(filename.c_str()); + std::ostringstream stream; + stream << file.rdbuf(); + file.close(); + return stream.str(); +} + cmQtAutoGenerators::cmQtAutoGenerators() : Verbose(cmsys::SystemTools::HasEnv("VERBOSE")) , ColorOutput(true) @@ -472,15 +481,6 @@ void cmQtAutoGenerators::Init() } } -static std::string ReadAll(const std::string& filename) -{ - cmsys::ifstream file(filename.c_str()); - std::ostringstream stream; - stream << file.rdbuf(); - file.close(); - return stream.str(); -} - bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) { // If settings changed everything needs to be re-generated. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c736c41ad192c89e1c74751a8f401c75955f5f3b commit c736c41ad192c89e1c74751a8f401c75955f5f3b Author: Sebastian Holtermann AuthorDate: Tue Dec 27 14:52:49 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Use precompiled regular expressions diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 8439f2a..6a7f828 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -28,27 +27,6 @@ #include #endif -static bool requiresMocing(const std::string& text, std::string& macroName) -{ - // this simple check is much much faster than the regexp - if (strstr(text.c_str(), "Q_OBJECT") == CM_NULLPTR && - strstr(text.c_str(), "Q_GADGET") == CM_NULLPTR) { - return false; - } - - cmsys::RegularExpression qObjectRegExp("[\n][ \t]*Q_OBJECT[^a-zA-Z0-9_]"); - if (qObjectRegExp.find(text)) { - macroName = "Q_OBJECT"; - return true; - } - cmsys::RegularExpression qGadgetRegExp("[\n][ \t]*Q_GADGET[^a-zA-Z0-9_]"); - if (qGadgetRegExp.find(text)) { - macroName = "Q_GADGET"; - return true; - } - return false; -} - static std::string findMatchingHeader( const std::string& absPath, const std::string& mocSubDir, const std::string& basename, @@ -120,6 +98,15 @@ cmQtAutoGenerators::cmQtAutoGenerators() this->ColorOutput = false; } } + + // Precompile regular expressions + this->RegExpQObject.compile("[\n][ \t]*Q_OBJECT[^a-zA-Z0-9_]"); + this->RegExpQGadget.compile("[\n][ \t]*Q_GADGET[^a-zA-Z0-9_]"); + this->RegExpMocInclude.compile( + "[\n][ \t]*#[ \t]*include[ \t]+" + "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]"); + this->RegExpUicInclude.compile("[\n][ \t]*#[ \t]*include[ \t]+" + "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]"); } void cmQtAutoGenerators::MergeUicOptions( @@ -600,10 +587,6 @@ bool cmQtAutoGenerators::ParseSourceFile( std::map& includedMocs, std::map >& includedUis, bool relaxed) { - cmsys::RegularExpression mocIncludeRegExp( - "[\n][ \t]*#[ \t]*include[ \t]+" - "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]"); - const std::string contentsString = ReadAll(absFilename); if (contentsString.empty()) { std::ostringstream err; @@ -629,7 +612,7 @@ bool cmQtAutoGenerators::ParseSourceFile( cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); std::string macroName; - const bool requiresMoc = requiresMocing(contentsString, macroName); + const bool requiresMoc = this->requiresMocing(contentsString, macroName); bool ownDotMocIncluded = false; bool ownMocUnderscoreIncluded = false; std::string ownMocUnderscoreFile; @@ -642,8 +625,8 @@ bool cmQtAutoGenerators::ParseSourceFile( if (strstr(contentsString.c_str(), "moc") != CM_NULLPTR) { // Iterate over all included moc files const char* contentChars = contentsString.c_str(); - while (mocIncludeRegExp.find(contentChars)) { - const std::string currentMoc = mocIncludeRegExp.match(1); + while (this->RegExpMocInclude.find(contentChars)) { + const std::string currentMoc = this->RegExpMocInclude.match(1); // Basename of the current moc include std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(currentMoc); @@ -758,7 +741,7 @@ bool cmQtAutoGenerators::ParseSourceFile( } } // Forward content pointer - contentChars += mocIncludeRegExp.end(); + contentChars += this->RegExpMocInclude.end(); } } @@ -799,6 +782,25 @@ bool cmQtAutoGenerators::ParseSourceFile( return true; } +bool cmQtAutoGenerators::requiresMocing(const std::string& text, + std::string& macroName) +{ + // Run a simple check before an expensive regular expression check + if (strstr(text.c_str(), "Q_OBJECT") != CM_NULLPTR) { + if (this->RegExpQObject.find(text)) { + macroName = "Q_OBJECT"; + return true; + } + } + if (strstr(text.c_str(), "Q_GADGET") != CM_NULLPTR) { + if (this->RegExpQGadget.find(text)) { + macroName = "Q_GADGET"; + return true; + } + } + return false; +} + void cmQtAutoGenerators::ParseForUic( const std::string& absFilename, std::map >& includedUis) @@ -825,20 +827,16 @@ void cmQtAutoGenerators::ParseForUic( return; } const std::string realName = cmsys::SystemTools::GetRealPath(absFilename); - cmsys::RegularExpression uiIncludeRegExp( - "[\n][ \t]*#[ \t]*include[ \t]+" - "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]"); - const char* contentChars = contentsString.c_str(); if (strstr(contentChars, "ui_") != CM_NULLPTR) { - while (uiIncludeRegExp.find(contentChars)) { - const std::string currentUi = uiIncludeRegExp.match(1); + while (this->RegExpUicInclude.find(contentChars)) { + const std::string currentUi = this->RegExpUicInclude.match(1); const std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(currentUi); // basename should be the part of the ui filename used for // finding the correct header, so we need to remove the ui_ part includedUis[realName].push_back(basename.substr(3)); - contentChars += uiIncludeRegExp.end(); + contentChars += this->RegExpUicInclude.end(); } } } @@ -893,7 +891,7 @@ void cmQtAutoGenerators::ParseHeaders( } std::string macroName; - if (requiresMocing(contents, macroName)) { + if (this->requiresMocing(contents, macroName)) { notIncludedMocs[headerName] = fpathCheckSum.getPart(headerName) + "/moc_" + cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName) + diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index 08f98b5..b6bca8a 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -5,6 +5,7 @@ #include // IWYU pragma: keep #include +#include #include #include @@ -65,6 +66,8 @@ private: std::map& notIncludedMocs, std::map >& includedUis); + bool requiresMocing(const std::string& text, std::string& macroName); + void ParseForUic( const std::string& fileName, const std::string& contentsString, std::map >& includedUis); @@ -138,6 +141,10 @@ private: std::string OldCompileSettingsStr; // - Utility cmFilePathChecksum fpathCheckSum; + cmsys::RegularExpression RegExpQObject; + cmsys::RegularExpression RegExpQGadget; + cmsys::RegularExpression RegExpMocInclude; + cmsys::RegularExpression RegExpUicInclude; // - Flags bool IncludeProjectDirsBefore; bool Verbose; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbd650c2642e40369eaa53d20dafee6cdccae4af commit cbd650c2642e40369eaa53d20dafee6cdccae4af Author: Sebastian Holtermann AuthorDate: Tue Dec 27 14:26:56 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:14 2017 +0100 AUTOGEN: Generators: Use unified ParseSourceFile and drop old methods diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 41bb6f9..8439f2a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -537,17 +537,12 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) err << "AUTOGEN: Checking " << absFilename << std::endl; this->LogInfo(err.str()); } - if (this->MocRelaxedMode) { - if (!this->ParseCppFile(absFilename, headerExtensions, includedMocs, - uiFiles)) { - return false; - } - } else { - if (!this->StrictParseCppFile(absFilename, headerExtensions, - includedMocs, uiFiles)) { - return false; - } + // Parse source file for MOC/UIC + if (!this->ParseSourceFile(absFilename, headerExtensions, includedMocs, + uiFiles, this->MocRelaxedMode)) { + return false; } + // Find additional headers this->SearchHeadersForCppFile(absFilename, headerExtensions, headerFiles); } @@ -599,311 +594,6 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) /** * @return True on success */ -bool cmQtAutoGenerators::ParseCppFile( - const std::string& absFilename, - const std::vector& headerExtensions, - std::map& includedMocs, - std::map >& includedUis) -{ - cmsys::RegularExpression mocIncludeRegExp( - "[\n][ \t]*#[ \t]*include[ \t]+" - "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]"); - - const std::string contentsString = ReadAll(absFilename); - if (contentsString.empty()) { - std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename << ": file is empty\n" - << std::endl; - this->LogWarning(err.str()); - return true; - } - this->ParseForUic(absFilename, contentsString, includedUis); - if (this->MocExecutable.empty()) { - return true; - } - - const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename)) + - '/'; - const std::string scannedFileBasename = - cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); - std::string macroName; - const bool requiresMoc = requiresMocing(contentsString, macroName); - bool dotMocIncluded = false; - bool mocUnderscoreIncluded = false; - std::string ownMocUnderscoreFile; - std::string ownDotMocFile; - std::string ownMocHeaderFile; - - std::string::size_type matchOffset = 0; - // first a simple string check for "moc" is *much* faster than the regexp, - // and if the string search already fails, we don't have to try the - // expensive regexp - if ((strstr(contentsString.c_str(), "moc") != CM_NULLPTR) && - (mocIncludeRegExp.find(contentsString))) { - // for every moc include in the file - do { - const std::string currentMoc = mocIncludeRegExp.match(1); - - std::string basename = - cmsys::SystemTools::GetFilenameWithoutLastExtension(currentMoc); - const bool mocUnderscoreStyle = cmHasLiteralPrefix(basename, "moc_"); - - // If the moc include is of the moc_foo.cpp style we expect - // the Q_OBJECT class declaration in a header file. - // If the moc include is of the foo.moc style we need to look for - // a Q_OBJECT macro in the current source file, if it contains the - // macro we generate the moc file from the source file. - if (mocUnderscoreStyle) { - // basename should be the part of the moc filename used for - // finding the correct header, so we need to remove the moc_ part - basename = basename.substr(4); - std::string mocSubDir = extractSubDir(absPath, currentMoc); - std::string headerToMoc = - findMatchingHeader(absPath, mocSubDir, basename, headerExtensions); - - if (!headerToMoc.empty()) { - includedMocs[headerToMoc] = currentMoc; - if (basename == scannedFileBasename) { - mocUnderscoreIncluded = true; - ownMocUnderscoreFile = currentMoc; - ownMocHeaderFile = headerToMoc; - } - } else { - std::ostringstream err; - err << "AUTOGEN: error: " << absFilename << ": The file " - << "includes the moc file \"" << currentMoc << "\", " - << "but could not find header \"" << basename << '{' - << this->JoinExts(headerExtensions) << "}\" "; - if (mocSubDir.empty()) { - err << "in " << absPath << "\n" << std::endl; - } else { - err << "neither in " << absPath << " nor in " << mocSubDir << "\n" - << std::endl; - } - this->LogError(err.str()); - return false; - } - } else { - std::string fileToMoc = absFilename; - if (!requiresMoc || basename != scannedFileBasename) { - std::string mocSubDir = extractSubDir(absPath, currentMoc); - std::string headerToMoc = - findMatchingHeader(absPath, mocSubDir, basename, headerExtensions); - if (!headerToMoc.empty()) { - // this is for KDE4 compatibility: - fileToMoc = headerToMoc; - if (!requiresMoc && basename == scannedFileBasename) { - std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename - << ": The file " - "includes the moc file \"" - << currentMoc << "\", but does not contain a " << macroName - << " macro. Running moc on " - << "\"" << headerToMoc << "\" ! Include \"moc_" << basename - << ".cpp\" for a compatibility with " - "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n" - << std::endl; - this->LogWarning(err.str()); - } else { - std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename - << ": The file " - "includes the moc file \"" - << currentMoc << "\" instead of \"moc_" << basename - << ".cpp\". " - "Running moc on " - << "\"" << headerToMoc << "\" ! Include \"moc_" << basename - << ".cpp\" for compatibility with " - "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n" - << std::endl; - this->LogWarning(err.str()); - } - } else { - std::ostringstream err; - err << "AUTOGEN: error: " << absFilename - << ": The file " - "includes the moc file \"" - << currentMoc - << "\", which seems to be the moc file from a different " - "source file. CMake also could not find a matching " - "header.\n" - << std::endl; - this->LogError(err.str()); - return false; - } - } else { - dotMocIncluded = true; - ownDotMocFile = currentMoc; - } - includedMocs[fileToMoc] = currentMoc; - } - matchOffset += mocIncludeRegExp.end(); - } while (mocIncludeRegExp.find(contentsString.c_str() + matchOffset)); - } - - // In this case, check whether the scanned file itself contains a Q_OBJECT. - // If this is the case, the moc_foo.cpp should probably be generated from - // foo.cpp instead of foo.h, because otherwise it won't build. - // But warn, since this is not how it is supposed to be used. - if (!dotMocIncluded && requiresMoc) { - if (mocUnderscoreIncluded) { - // this is for KDE4 compatibility: - std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename << ": The file " - << "contains a " << macroName << " macro, but does not " - "include " - << "\"" << scannedFileBasename << ".moc\", but instead " - "includes " - << "\"" << ownMocUnderscoreFile << "\". Running moc on " - << "\"" << absFilename << "\" ! Better include \"" - << scannedFileBasename - << ".moc\" for compatibility with " - "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n" - << std::endl; - this->LogWarning(err.str()); - - includedMocs[absFilename] = ownMocUnderscoreFile; - includedMocs.erase(ownMocHeaderFile); - } else { - // otherwise always error out since it will not compile: - std::ostringstream err; - err << "AUTOGEN: error: " << absFilename << ": The file " - << "contains a " << macroName << " macro, but does not " - "include " - << "\"" << scannedFileBasename << ".moc\" !\n" - << std::endl; - this->LogError(err.str()); - return false; - } - } - - return true; -} - -/** - * @return True on success - */ -bool cmQtAutoGenerators::StrictParseCppFile( - const std::string& absFilename, - const std::vector& headerExtensions, - std::map& includedMocs, - std::map >& includedUis) -{ - cmsys::RegularExpression mocIncludeRegExp( - "[\n][ \t]*#[ \t]*include[ \t]+" - "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]"); - - const std::string contentsString = ReadAll(absFilename); - if (contentsString.empty()) { - std::ostringstream err; - err << "AUTOGEN: warning: " << absFilename << ": file is empty\n" - << std::endl; - this->LogWarning(err.str()); - return true; - } - this->ParseForUic(absFilename, contentsString, includedUis); - if (this->MocExecutable.empty()) { - return true; - } - - const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename)) + - '/'; - const std::string scannedFileBasename = - cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); - - bool dotMocIncluded = false; - - std::string::size_type matchOffset = 0; - // first a simple string check for "moc" is *much* faster than the regexp, - // and if the string search already fails, we don't have to try the - // expensive regexp - if ((strstr(contentsString.c_str(), "moc") != CM_NULLPTR) && - (mocIncludeRegExp.find(contentsString))) { - // for every moc include in the file - do { - const std::string currentMoc = mocIncludeRegExp.match(1); - - std::string basename = - cmsys::SystemTools::GetFilenameWithoutLastExtension(currentMoc); - const bool mocUnderscoreStyle = cmHasLiteralPrefix(basename, "moc_"); - - // If the moc include is of the moc_foo.cpp style we expect - // the Q_OBJECT class declaration in a header file. - // If the moc include is of the foo.moc style we need to look for - // a Q_OBJECT macro in the current source file, if it contains the - // macro we generate the moc file from the source file. - if (mocUnderscoreStyle) { - // basename should be the part of the moc filename used for - // finding the correct header, so we need to remove the moc_ part - basename = basename.substr(4); - std::string mocSubDir = extractSubDir(absPath, currentMoc); - std::string headerToMoc = - findMatchingHeader(absPath, mocSubDir, basename, headerExtensions); - - if (!headerToMoc.empty()) { - includedMocs[headerToMoc] = currentMoc; - } else { - std::ostringstream err; - err << "AUTOGEN: error: " << absFilename << " The file " - << "includes the moc file \"" << currentMoc << "\", " - << "but could not find header \"" << basename << '{' - << this->JoinExts(headerExtensions) << "}\" "; - if (mocSubDir.empty()) { - err << "in " << absPath << "\n" << std::endl; - } else { - err << "neither in " << absPath << " nor in " << mocSubDir << "\n" - << std::endl; - } - this->LogError(err.str()); - return false; - } - } else { - if (basename != scannedFileBasename) { - std::ostringstream err; - err << "AUTOGEN: error: " << absFilename - << ": The file " - "includes the moc file \"" - << currentMoc - << "\", which seems to be the moc file from a different " - "source file. This is not supported. " - "Include \"" - << scannedFileBasename << ".moc\" to run " - "moc on this source file.\n" - << std::endl; - this->LogError(err.str()); - return false; - } - dotMocIncluded = true; - includedMocs[absFilename] = currentMoc; - } - matchOffset += mocIncludeRegExp.end(); - } while (mocIncludeRegExp.find(contentsString.c_str() + matchOffset)); - } - - // In this case, check whether the scanned file itself contains a Q_OBJECT. - // If this is the case, the moc_foo.cpp should probably be generated from - // foo.cpp instead of foo.h, because otherwise it won't build. - // But warn, since this is not how it is supposed to be used. - std::string macroName; - if (!dotMocIncluded && requiresMocing(contentsString, macroName)) { - // otherwise always error out since it will not compile: - std::ostringstream err; - err << "AUTOGEN: error: " << absFilename << ": The file " - << "contains a " << macroName << " macro, but does not include " - << "\"" << scannedFileBasename << ".moc\" !\n" - << std::endl; - this->LogError(err.str()); - return false; - } - - return true; -} - -/** - * @return True on success - */ bool cmQtAutoGenerators::ParseSourceFile( const std::string& absFilename, const std::vector& headerExtensions, diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index f6fbed3..08f98b5 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -48,16 +48,6 @@ private: bool GenerateQrc(const std::string& qrcInputFile, const std::string& qrcOutputFile, bool unique_n); - bool ParseCppFile( - const std::string& absFilename, - const std::vector& headerExtensions, - std::map& includedMocs, - std::map >& includedUis); - bool StrictParseCppFile( - const std::string& absFilename, - const std::vector& headerExtensions, - std::map& includedMocs, - std::map >& includedUis); bool ParseSourceFile( const std::string& absFilename, const std::vector& headerExtensions, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b1527ff3d1781380756ee72a9641b7c5c7c87cc commit 0b1527ff3d1781380756ee72a9641b7c5c7c87cc Author: Sebastian Holtermann AuthorDate: Tue Dec 27 14:16:10 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:13 2017 +0100 AUTOGEN: Generators: Introduce unified ParseSourceFile The new cmQtAutoGenerators::ParseSourceFile method combines the functionality of ParseCppFile and StrictParseCppFile in a single method to avoid code duplication. Relaxed or strict mode is selected by an additional bool argument. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a0949d4..41bb6f9 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -901,6 +901,214 @@ bool cmQtAutoGenerators::StrictParseCppFile( return true; } +/** + * @return True on success + */ +bool cmQtAutoGenerators::ParseSourceFile( + const std::string& absFilename, + const std::vector& headerExtensions, + std::map& includedMocs, + std::map >& includedUis, bool relaxed) +{ + cmsys::RegularExpression mocIncludeRegExp( + "[\n][ \t]*#[ \t]*include[ \t]+" + "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]"); + + const std::string contentsString = ReadAll(absFilename); + if (contentsString.empty()) { + std::ostringstream err; + err << "AUTOGEN: warning: " << absFilename << "\n" + << "The file is empty\n"; + this->LogWarning(err.str()); + return true; + } + + // Parse source contents for UIC + this->ParseForUic(absFilename, contentsString, includedUis); + + // Continue with moc parsing on demand + if (this->MocExecutable.empty()) { + return true; + } + + const std::string scannedFileAbsPath = + cmsys::SystemTools::GetFilenamePath( + cmsys::SystemTools::GetRealPath(absFilename)) + + '/'; + const std::string scannedFileBasename = + cmsys::SystemTools::GetFilenameWithoutLastExtension(absFilename); + + std::string macroName; + const bool requiresMoc = requiresMocing(contentsString, macroName); + bool ownDotMocIncluded = false; + bool ownMocUnderscoreIncluded = false; + std::string ownMocUnderscoreFile; + std::string ownMocHeaderFile; + + std::string::size_type matchOffset = 0; + // first a simple string check for "moc" is *much* faster than the regexp, + // and if the string search already fails, we don't have to try the + // expensive regexp + if (strstr(contentsString.c_str(), "moc") != CM_NULLPTR) { + // Iterate over all included moc files + const char* contentChars = contentsString.c_str(); + while (mocIncludeRegExp.find(contentChars)) { + const std::string currentMoc = mocIncludeRegExp.match(1); + // Basename of the current moc include + std::string basename = + cmsys::SystemTools::GetFilenameWithoutLastExtension(currentMoc); + + // If the moc include is of the moc_foo.cpp style we expect + // the Q_OBJECT class declaration in a header file. + // If the moc include is of the foo.moc style we need to look for + // a Q_OBJECT macro in the current source file, if it contains the + // macro we generate the moc file from the source file. + if (cmHasLiteralPrefix(basename, "moc_")) { + // Include: moc_FOO.cxx + // basename should be the part of the moc filename used for + // finding the correct header, so we need to remove the moc_ part + basename = basename.substr(4); + const std::string mocSubDir = + extractSubDir(scannedFileAbsPath, currentMoc); + const std::string headerToMoc = findMatchingHeader( + scannedFileAbsPath, mocSubDir, basename, headerExtensions); + + if (!headerToMoc.empty()) { + includedMocs[headerToMoc] = currentMoc; + if (relaxed && (basename == scannedFileBasename)) { + ownMocUnderscoreIncluded = true; + ownMocUnderscoreFile = currentMoc; + ownMocHeaderFile = headerToMoc; + } + } else { + std::ostringstream err; + err << "AUTOGEN: error: " << absFilename << "\n" + << "The file includes the moc file \"" << currentMoc + << "\", but could not find header \"" << basename << '{' + << this->JoinExts(headerExtensions) << "}\" "; + if (mocSubDir.empty()) { + err << "in " << scannedFileAbsPath << "\n"; + } else { + err << "neither in " << scannedFileAbsPath << " nor in " + << mocSubDir << "\n"; + } + this->LogError(err.str()); + return false; + } + } else { + // Include: FOO.moc + std::string fileToMoc; + if (relaxed) { + // Mode: Relaxed + if (!requiresMoc || basename != scannedFileBasename) { + const std::string mocSubDir = + extractSubDir(scannedFileAbsPath, currentMoc); + const std::string headerToMoc = findMatchingHeader( + scannedFileAbsPath, mocSubDir, basename, headerExtensions); + if (!headerToMoc.empty()) { + // This is for KDE4 compatibility: + fileToMoc = headerToMoc; + if (!requiresMoc && basename == scannedFileBasename) { + std::ostringstream err; + err << "AUTOMOC: warning: " << absFilename << "\n" + << "The file includes the moc file \"" << currentMoc + << "\", but does not contain a " << macroName + << " macro. Running moc on " + << "\"" << headerToMoc << "\" ! Include \"moc_" << basename + << ".cpp\" for a compatibility with " + "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"; + this->LogWarning(err.str()); + } else { + std::ostringstream err; + err << "AUTOMOC: warning: " << absFilename << "\n" + << "The file includes the moc file \"" << currentMoc + << "\" instead of \"moc_" << basename + << ".cpp\". Running moc on " + << "\"" << headerToMoc << "\" ! Include \"moc_" << basename + << ".cpp\" for compatibility with " + "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"; + this->LogWarning(err.str()); + } + } else { + std::ostringstream err; + err << "AUTOMOC: error: " << absFilename << "\n" + << "The file includes the moc file \"" << currentMoc + << "\", which seems to be the moc file from a different " + "source file. CMake also could not find a matching " + "header.\n"; + this->LogError(err.str()); + return false; + } + } else { + // Include self + fileToMoc = absFilename; + ownDotMocIncluded = true; + } + } else { + // Mode: Strict + if (basename != scannedFileBasename) { + // Don't allow FOO.moc include other than self in strict mode + std::ostringstream err; + err << "AUTOMOC: error: " << absFilename << "\n" + << "The file includes the moc file \"" << currentMoc + << "\", which seems to be the moc file from a different " + "source file. This is not supported. Include \"" + << scannedFileBasename + << ".moc\" to run moc on this source file.\n"; + this->LogError(err.str()); + return false; + } else { + // Include self + fileToMoc = absFilename; + ownDotMocIncluded = true; + } + } + if (!fileToMoc.empty()) { + includedMocs[fileToMoc] = currentMoc; + } + } + // Forward content pointer + contentChars += mocIncludeRegExp.end(); + } + } + + // In this case, check whether the scanned file itself contains a Q_OBJECT. + // If this is the case, the moc_foo.cpp should probably be generated from + // foo.cpp instead of foo.h, because otherwise it won't build. + // But warn, since this is not how it is supposed to be used. + if (requiresMoc && !ownDotMocIncluded) { + if (relaxed && ownMocUnderscoreIncluded) { + // This is for KDE4 compatibility: + std::ostringstream err; + err << "AUTOMOC: warning: " << absFilename << "\n" + << "The file contains a " << macroName + << " macro, but does not include " + << "\"" << scannedFileBasename << ".moc\", but instead includes " + << "\"" << ownMocUnderscoreFile << "\". Running moc on " + << "\"" << absFilename << "\" ! Better include \"" + << scannedFileBasename + << ".moc\" for compatibility with " + "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n"; + this->LogWarning(err.str()); + + // Use scanned source file instead of scanned header file as moc source + includedMocs[absFilename] = ownMocUnderscoreFile; + includedMocs.erase(ownMocHeaderFile); + } else { + // Otherwise always error out since it will not compile: + std::ostringstream err; + err << "AUTOMOC: error: " << absFilename << "\n" + << "The file contains a " << macroName + << " macro, but does not include " + << "\"" << scannedFileBasename << ".moc\" !\n"; + this->LogError(err.str()); + return false; + } + } + + return true; +} + void cmQtAutoGenerators::ParseForUic( const std::string& absFilename, std::map >& includedUis) diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index 24960a5..f6fbed3 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -58,6 +58,12 @@ private: const std::vector& headerExtensions, std::map& includedMocs, std::map >& includedUis); + bool ParseSourceFile( + const std::string& absFilename, + const std::vector& headerExtensions, + std::map& includedMocs, + std::map >& includedUis, + bool relaxed); void SearchHeadersForCppFile( const std::string& absFilename, const std::vector& headerExtensions, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b9d795e63acf723a6abd79f3195ec70476442a5 commit 2b9d795e63acf723a6abd79f3195ec70476442a5 Author: Sebastian Holtermann AuthorDate: Tue Dec 27 10:54:54 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:13 2017 +0100 AUTOGEN: Generators: Comments diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 6543ac6..a0949d4 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -62,6 +62,7 @@ static std::string findMatchingHeader( header = sourceFilePath; break; } + // Try subdirectory instead if (!mocSubDir.empty()) { sourceFilePath = mocSubDir + basename + "." + (*ext); if (cmsys::SystemTools::FileExists(sourceFilePath.c_str())) { @@ -653,7 +654,6 @@ bool cmQtAutoGenerators::ParseCppFile( // If the moc include is of the foo.moc style we need to look for // a Q_OBJECT macro in the current source file, if it contains the // macro we generate the moc file from the source file. - // Q_OBJECT if (mocUnderscoreStyle) { // basename should be the part of the moc filename used for // finding the correct header, so we need to remove the moc_ part https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cfcdf757d032cdea8b980792007a6f9d749e6fb commit 2cfcdf757d032cdea8b980792007a6f9d749e6fb Author: Sebastian Holtermann AuthorDate: Tue Dec 27 10:51:14 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:13 2017 +0100 AUTOGEN: Generators: Variable rename diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 1ada434..6543ac6 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -646,7 +646,7 @@ bool cmQtAutoGenerators::ParseCppFile( std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(currentMoc); - const bool moc_style = cmHasLiteralPrefix(basename, "moc_"); + const bool mocUnderscoreStyle = cmHasLiteralPrefix(basename, "moc_"); // If the moc include is of the moc_foo.cpp style we expect // the Q_OBJECT class declaration in a header file. @@ -654,7 +654,7 @@ bool cmQtAutoGenerators::ParseCppFile( // a Q_OBJECT macro in the current source file, if it contains the // macro we generate the moc file from the source file. // Q_OBJECT - if (moc_style) { + if (mocUnderscoreStyle) { // basename should be the part of the moc filename used for // finding the correct header, so we need to remove the moc_ part basename = basename.substr(4); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f67aef23d4192fadb222dc79311fb5ffbbc36ce commit 2f67aef23d4192fadb222dc79311fb5ffbbc36ce Author: Sebastian Holtermann AuthorDate: Sat Dec 24 16:28:01 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:13 2017 +0100 AUTOGEN: Generators: Cleanup and optimize ParseForUic method diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 01cc1b3..1ada434 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -931,23 +931,17 @@ void cmQtAutoGenerators::ParseForUic( "[\n][ \t]*#[ \t]*include[ \t]+" "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]"); - std::string::size_type matchOffset = 0; - if ((strstr(contentsString.c_str(), "ui_") != CM_NULLPTR) && - (uiIncludeRegExp.find(contentsString))) { - do { + const char* contentChars = contentsString.c_str(); + if (strstr(contentChars, "ui_") != CM_NULLPTR) { + while (uiIncludeRegExp.find(contentChars)) { const std::string currentUi = uiIncludeRegExp.match(1); - - std::string basename = + const std::string basename = cmsys::SystemTools::GetFilenameWithoutLastExtension(currentUi); - // basename should be the part of the ui filename used for // finding the correct header, so we need to remove the ui_ part - basename = basename.substr(3); - - includedUis[realName].push_back(basename); - - matchOffset += uiIncludeRegExp.end(); - } while (uiIncludeRegExp.find(contentsString.c_str() + matchOffset)); + includedUis[realName].push_back(basename.substr(3)); + contentChars += uiIncludeRegExp.end(); + } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=794fdf40a1bc85dded519d7c737f73690e3a6e42 commit 794fdf40a1bc85dded519d7c737f73690e3a6e42 Author: Sebastian Holtermann AuthorDate: Sat Dec 24 16:00:09 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:13 2017 +0100 AUTOGEN: Generators: Cleanup variable initialization diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 98b3de3..01cc1b3 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -926,15 +926,12 @@ void cmQtAutoGenerators::ParseForUic( if (this->UicExecutable.empty()) { return; } + const std::string realName = cmsys::SystemTools::GetRealPath(absFilename); cmsys::RegularExpression uiIncludeRegExp( "[\n][ \t]*#[ \t]*include[ \t]+" "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]"); std::string::size_type matchOffset = 0; - - const std::string realName = cmsys::SystemTools::GetRealPath(absFilename); - - matchOffset = 0; if ((strstr(contentsString.c_str(), "ui_") != CM_NULLPTR) && (uiIncludeRegExp.find(contentsString))) { do { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1e49bb155132606ed9f590c0b62e68f2e288d0b commit a1e49bb155132606ed9f590c0b62e68f2e288d0b Author: Sebastian Holtermann AuthorDate: Sat Dec 24 17:36:56 2016 +0100 Commit: Sebastian Holtermann CommitDate: Tue Jan 10 12:49:13 2017 +0100 AUTOGEN: Generators: rename makeParentDirectory to MakeParentDirectory diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a9a9c49..98b3de3 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1113,7 +1113,7 @@ bool cmQtAutoGenerators::GenerateMocFiles( this->LogBold(msg); } // Make sure the parent directory exists - bool success = this->makeParentDirectory(this->OutMocCppFilenameAbs); + bool success = this->MakeParentDirectory(this->OutMocCppFilenameAbs); if (success) { cmsys::ofstream outfile; outfile.open(this->OutMocCppFilenameAbs.c_str(), std::ios::trunc); @@ -1154,7 +1154,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, this->LogBold("Generating MOC source " + mocFileRel); // Make sure the parent directory exists - if (!this->makeParentDirectory(mocFileAbs)) { + if (!this->MakeParentDirectory(mocFileAbs)) { this->RunMocFailed = true; return false; } @@ -1276,7 +1276,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName, this->LogBold("Generating UIC header " + uicFileRel); // Make sure the parent directory exists - if (!this->makeParentDirectory(uicFileAbs)) { + if (!this->MakeParentDirectory(uicFileAbs)) { this->RunUicFailed = true; return false; } @@ -1415,7 +1415,7 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile, } // Make sure the parent directory exists - if (!this->makeParentDirectory(qrcOutputFile)) { + if (!this->MakeParentDirectory(qrcOutputFile)) { this->RunRccFailed = true; return false; } @@ -1551,7 +1551,7 @@ void cmQtAutoGenerators::LogCommand(const std::vector& command) * @brief Generates the parent directory of the given file on demand * @return True on success */ -bool cmQtAutoGenerators::makeParentDirectory(const std::string& filename) +bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename) { bool success = true; const std::string dirName = cmSystemTools::GetFilenamePath(filename); diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index c241579..24960a5 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -91,7 +91,7 @@ private: void LogError(const std::string& message); void LogCommand(const std::vector& command); - bool makeParentDirectory(const std::string& filename); + bool MakeParentDirectory(const std::string& filename); std::string JoinExts(const std::vector& lst); ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 4 + Help/manual/cmake-qt.7.rst | 9 + Help/prop_sf/SKIP_AUTOGEN.rst | 8 + Help/prop_sf/SKIP_AUTOMOC.rst | 6 + Help/prop_sf/SKIP_AUTORCC.rst | 6 + Help/prop_sf/SKIP_AUTOUIC.rst | 6 + Help/prop_tgt/AUTOMOC.rst | 3 + Help/prop_tgt/AUTORCC.rst | 3 + Help/prop_tgt/AUTOUIC.rst | 3 + Help/release/dev/QtAutogen_Skip.rst | 12 + Modules/AutogenInfo.cmake.in | 8 +- Source/cmQtAutoGeneratorInitializer.cxx | 102 ++-- Source/cmQtAutoGenerators.cxx | 741 ++++++++++++-------------- Source/cmQtAutoGenerators.h | 46 +- Tests/QtAutogen/CMakeLists.txt | 63 +++ Tests/QtAutogen/skipMoc.cpp | 14 + Tests/QtAutogen/skipRcc.cpp | 9 + Tests/QtAutogen/skipSource/qItemA.cpp | 5 + Tests/QtAutogen/skipSource/qItemA.hpp | 13 + Tests/QtAutogen/skipSource/qItemB.cpp | 5 + Tests/QtAutogen/skipSource/qItemB.hpp | 13 + Tests/QtAutogen/skipSource/qItemC.cpp | 5 + Tests/QtAutogen/skipSource/qItemC.hpp | 13 + Tests/QtAutogen/skipSource/skipRccBad1.qrc | 5 + Tests/QtAutogen/skipSource/skipRccBad2.qrc | 5 + Tests/QtAutogen/skipSource/skipRccGood.qrc | 6 + Tests/QtAutogen/skipSource/skipUicGen.cpp | 7 + Tests/QtAutogen/skipSource/skipUicGen.hpp | 8 + Tests/QtAutogen/skipSource/skipUicNoGen1.cpp | 7 + Tests/QtAutogen/skipSource/skipUicNoGen1.hpp | 8 + Tests/QtAutogen/skipSource/skipUicNoGen2.cpp | 7 + Tests/QtAutogen/skipSource/skipUicNoGen2.hpp | 8 + Tests/QtAutogen/skipSource/ui_nogen1.h | 6 + Tests/QtAutogen/skipSource/ui_nogen2.h | 6 + Tests/QtAutogen/skipSource/uigen1.ui | 24 + Tests/QtAutogen/skipSource/uigen2.ui | 24 + Tests/QtAutogen/skipUic.cpp | 22 + 37 files changed, 782 insertions(+), 458 deletions(-) create mode 100644 Help/prop_sf/SKIP_AUTOGEN.rst create mode 100644 Help/prop_sf/SKIP_AUTOMOC.rst create mode 100644 Help/prop_sf/SKIP_AUTORCC.rst create mode 100644 Help/prop_sf/SKIP_AUTOUIC.rst create mode 100644 Help/release/dev/QtAutogen_Skip.rst create mode 100644 Tests/QtAutogen/skipMoc.cpp create mode 100644 Tests/QtAutogen/skipRcc.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemA.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemA.hpp create mode 100644 Tests/QtAutogen/skipSource/qItemB.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemB.hpp create mode 100644 Tests/QtAutogen/skipSource/qItemC.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemC.hpp create mode 100644 Tests/QtAutogen/skipSource/skipRccBad1.qrc create mode 100644 Tests/QtAutogen/skipSource/skipRccBad2.qrc create mode 100644 Tests/QtAutogen/skipSource/skipRccGood.qrc create mode 100644 Tests/QtAutogen/skipSource/skipUicGen.cpp create mode 100644 Tests/QtAutogen/skipSource/skipUicGen.hpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen1.cpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen1.hpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen2.cpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen2.hpp create mode 100644 Tests/QtAutogen/skipSource/ui_nogen1.h create mode 100644 Tests/QtAutogen/skipSource/ui_nogen2.h create mode 100644 Tests/QtAutogen/skipSource/uigen1.ui create mode 100644 Tests/QtAutogen/skipSource/uigen2.ui create mode 100644 Tests/QtAutogen/skipUic.cpp hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 15:37:15 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 15:37:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2028-g19e5a8a Message-ID: <20170110203716.27B1BFA75E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 19e5a8a29816e5f9a61b53a444a127b87c55c12e (commit) via e537bd91129fc1616f787b64024f1b08d0f7ae45 (commit) via 0a2e588585a951b1f26cfa9094e0709f1d026b1e (commit) via cdacfbd255dcf640be7dd4971a1be616d015b3fd (commit) via cf590c1236e40eaff9fe76ec918fad33df4f6be4 (commit) from 25b5e76e15b3b5fe6e0aacd5345ecd1f3d360e5b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19e5a8a29816e5f9a61b53a444a127b87c55c12e commit 19e5a8a29816e5f9a61b53a444a127b87c55c12e Merge: 25b5e76 e537bd9 Author: Brad King AuthorDate: Tue Jan 10 15:37:11 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 15:37:11 2017 -0500 Merge topic 'ctest_memcheck-leak_sanitizer' into next e537bd91 ctest_memcheck: do not add detect_leaks=1 to ASAN_OPTIONS 0a2e5885 ctest_memcheck: join *SAN_OPTIONS with : cdacfbd2 MEMORYCHECK_SUPPRESSIONS_FILE: add support for sanitizers cf590c12 ctest_memcheck: add support for standalone LeakSanitizer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e537bd91129fc1616f787b64024f1b08d0f7ae45 commit e537bd91129fc1616f787b64024f1b08d0f7ae45 Author: Jamie Snape AuthorDate: Mon Jan 9 13:43:19 2017 -0500 Commit: Jamie Snape CommitDate: Mon Jan 9 13:43:19 2017 -0500 ctest_memcheck: do not add detect_leaks=1 to ASAN_OPTIONS diff --git a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst index 60b4a22..3fa5c49 100644 --- a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst +++ b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst @@ -4,6 +4,11 @@ ctest_memcheck-leak_sanitizer * The :command:`ctest_memcheck` command learned to support ``LeakSanitizer`` independently from ``AddressSanitizer``. +* The :command:`ctest_memcheck` command no longer automatically adds + ``leak_check=1`` to the options used by ``AddressSanitizer``. The default + behavior of ``AddressSanitizer`` is to run `LeakSanitizer` to check leaks + unless ``leak_check=0``. + * The :command:`ctest_memcheck` command learned to read the location of suppressions files for sanitizers from the :variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE` variable. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index fc07249..4d23e45 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -618,7 +618,6 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() if (this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER) { envVar = "ASAN_OPTIONS"; - extraOptions += ":detect_leaks=1"; } else if (this->MemoryTesterStyle == cmCTestMemCheckHandler::LEAK_SANITIZER) { envVar = "LSAN_OPTIONS"; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a2e588585a951b1f26cfa9094e0709f1d026b1e commit 0a2e588585a951b1f26cfa9094e0709f1d026b1e Author: Jamie Snape AuthorDate: Mon Jan 9 13:39:08 2017 -0500 Commit: Jamie Snape CommitDate: Mon Jan 9 13:39:08 2017 -0500 ctest_memcheck: join *SAN_OPTIONS with : diff --git a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst index 1348c278a..60b4a22 100644 --- a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst +++ b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst @@ -7,3 +7,8 @@ ctest_memcheck-leak_sanitizer * The :command:`ctest_memcheck` command learned to read the location of suppressions files for sanitizers from the :variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE` variable. + +* The :command:`ctest_memcheck` command was fixed to correctly append extra + sanitizer options read from the + :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS` variable to the environment + variables used internally by the sanitizers. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 81b73aa..fc07249 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -607,18 +607,18 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->MemoryTesterDynamicOptions.push_back("-E"); this->MemoryTesterDynamicOptions.push_back("env"); std::string envVar; - std::string extraOptions = + std::string extraOptions = ":" + this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions"); std::string suppressionsOption; if (!this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile") .empty()) { - suppressionsOption = " suppressions=" + + suppressionsOption = ":suppressions=" + this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile"); } if (this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER) { envVar = "ASAN_OPTIONS"; - extraOptions += " detect_leaks=1"; + extraOptions += ":detect_leaks=1"; } else if (this->MemoryTesterStyle == cmCTestMemCheckHandler::LEAK_SANITIZER) { envVar = "LSAN_OPTIONS"; @@ -633,7 +633,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() envVar = "UBSAN_OPTIONS"; } std::string outputFile = - envVar + "=log_path=\"" + this->MemoryTesterOutputFile + "\" "; + envVar + "=log_path=\"" + this->MemoryTesterOutputFile + "\""; this->MemoryTesterEnvironmentVariable = outputFile + extraOptions + suppressionsOption; break; diff --git a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake index 25bb6a2..352a381 100644 --- a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake @@ -32,7 +32,7 @@ unset(CTEST_EXTRA_CODE) #----------------------------------------------------------------------------- # add standalone LeakSanitizer test set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55\") ") set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" @@ -45,7 +45,7 @@ unset(CTEST_EXTRA_CODE) #----------------------------------------------------------------------------- # add AddressSanitizer test set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55\") ") set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" @@ -58,7 +58,7 @@ unset(CTEST_EXTRA_CODE) #----------------------------------------------------------------------------- # add AddressSanitizer/LeakSanitizer test set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55\") ") set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" @@ -71,7 +71,7 @@ unset(CTEST_EXTRA_CODE) #----------------------------------------------------------------------------- # add MemorySanitizer test set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55\") ") set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"\${CMAKE_COMMAND}\" @@ -164,7 +164,7 @@ unset(CTEST_SUFFIX_CODE) set(CTEST_SUFFIX_CODE "message(\"Defect count: \${defect_count}\")") set(CTEST_MEMCHECK_ARGS "DEFECT_COUNT defect_count") set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55\") ") set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cdacfbd255dcf640be7dd4971a1be616d015b3fd commit cdacfbd255dcf640be7dd4971a1be616d015b3fd Author: Jamie Snape AuthorDate: Mon Jan 9 13:39:06 2017 -0500 Commit: Jamie Snape CommitDate: Mon Jan 9 13:39:06 2017 -0500 MEMORYCHECK_SUPPRESSIONS_FILE: add support for sanitizers diff --git a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst index 0150da3..1348c278a 100644 --- a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst +++ b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst @@ -3,3 +3,7 @@ ctest_memcheck-leak_sanitizer * The :command:`ctest_memcheck` command learned to support ``LeakSanitizer`` independently from ``AddressSanitizer``. + +* The :command:`ctest_memcheck` command learned to read the location of + suppressions files for sanitizers from the + :variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE` variable. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 5dec355..81b73aa 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -609,6 +609,12 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() std::string envVar; std::string extraOptions = this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions"); + std::string suppressionsOption; + if (!this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile") + .empty()) { + suppressionsOption = " suppressions=" + + this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile"); + } if (this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER) { envVar = "ASAN_OPTIONS"; @@ -628,7 +634,8 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() } std::string outputFile = envVar + "=log_path=\"" + this->MemoryTesterOutputFile + "\" "; - this->MemoryTesterEnvironmentVariable = outputFile + extraOptions; + this->MemoryTesterEnvironmentVariable = + outputFile + extraOptions + suppressionsOption; break; } default: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf590c1236e40eaff9fe76ec918fad33df4f6be4 commit cf590c1236e40eaff9fe76ec918fad33df4f6be4 Author: Jamie Snape AuthorDate: Mon Jan 9 13:15:42 2017 -0500 Commit: Jamie Snape CommitDate: Mon Jan 9 13:15:42 2017 -0500 ctest_memcheck: add support for standalone LeakSanitizer diff --git a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst new file mode 100644 index 0000000..0150da3 --- /dev/null +++ b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst @@ -0,0 +1,5 @@ +ctest_memcheck-leak_sanitizer +============================= + +* The :command:`ctest_memcheck` command learned to support ``LeakSanitizer`` + independently from ``AddressSanitizer``. diff --git a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst index b963293..b8b4c30 100644 --- a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst +++ b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst @@ -4,5 +4,5 @@ CTEST_MEMORYCHECK_TYPE Specify the CTest ``MemoryCheckType`` setting in a :manual:`ctest(1)` dashboard client script. Valid values are ``Valgrind``, ``Purify``, ``BoundsChecker``, and -``ThreadSanitizer``, ``AddressSanitizer``, ``MemorySanitizer``, and +``ThreadSanitizer``, ``AddressSanitizer``, ``LeakSanitizer``, ``MemorySanitizer``, and ``UndefinedBehaviorSanitizer``. diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 2c31f60..5dec355 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -305,6 +305,9 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml) case cmCTestMemCheckHandler::ADDRESS_SANITIZER: xml.Attribute("Checker", "AddressSanitizer"); break; + case cmCTestMemCheckHandler::LEAK_SANITIZER: + xml.Attribute("Checker", "LeakSanitizer"); + break; case cmCTestMemCheckHandler::THREAD_SANITIZER: xml.Attribute("Checker", "ThreadSanitizer"); break; @@ -459,6 +462,12 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->LogWithPID = true; // even if we give the log file the pid is added } if (this->CTest->GetCTestConfiguration("MemoryCheckType") == + "LeakSanitizer") { + this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand"); + this->MemoryTesterStyle = cmCTestMemCheckHandler::LEAK_SANITIZER; + this->LogWithPID = true; // even if we give the log file the pid is added + } + if (this->CTest->GetCTestConfiguration("MemoryCheckType") == "ThreadSanitizer") { this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::THREAD_SANITIZER; @@ -586,6 +595,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() } // these are almost the same but the env var used is different case cmCTestMemCheckHandler::ADDRESS_SANITIZER: + case cmCTestMemCheckHandler::LEAK_SANITIZER: case cmCTestMemCheckHandler::THREAD_SANITIZER: case cmCTestMemCheckHandler::MEMORY_SANITIZER: case cmCTestMemCheckHandler::UB_SANITIZER: { @@ -604,6 +614,9 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() envVar = "ASAN_OPTIONS"; extraOptions += " detect_leaks=1"; } else if (this->MemoryTesterStyle == + cmCTestMemCheckHandler::LEAK_SANITIZER) { + envVar = "LSAN_OPTIONS"; + } else if (this->MemoryTesterStyle == cmCTestMemCheckHandler::THREAD_SANITIZER) { envVar = "TSAN_OPTIONS"; } else if (this->MemoryTesterStyle == @@ -644,6 +657,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckOutput(const std::string& str, case cmCTestMemCheckHandler::PURIFY: return this->ProcessMemCheckPurifyOutput(str, log, results); case cmCTestMemCheckHandler::ADDRESS_SANITIZER: + case cmCTestMemCheckHandler::LEAK_SANITIZER: case cmCTestMemCheckHandler::THREAD_SANITIZER: case cmCTestMemCheckHandler::MEMORY_SANITIZER: case cmCTestMemCheckHandler::UB_SANITIZER: @@ -680,6 +694,9 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput( case cmCTestMemCheckHandler::ADDRESS_SANITIZER: regex = "ERROR: AddressSanitizer: (.*) on.*"; break; + case cmCTestMemCheckHandler::LEAK_SANITIZER: + // use leakWarning regex + break; case cmCTestMemCheckHandler::THREAD_SANITIZER: regex = "WARNING: ThreadSanitizer: (.*) \\(pid=.*\\)"; break; diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 5faace0..ff8b593 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -47,6 +47,7 @@ private: BOUNDS_CHECKER, // checkers after here do not use the standard error list ADDRESS_SANITIZER, + LEAK_SANITIZER, THREAD_SANITIZER, MEMORY_SANITIZER, UB_SANITIZER diff --git a/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stderr.txt b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stderr.txt new file mode 100644 index 0000000..327bd5c --- /dev/null +++ b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stderr.txt @@ -0,0 +1 @@ +Cannot find memory tester output file: .*/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-build/Testing/Temporary/MemoryChecker.1.log\.\* diff --git a/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stdout.txt b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stdout.txt new file mode 100644 index 0000000..97a8a9b --- /dev/null +++ b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stdout.txt @@ -0,0 +1,3 @@ +Memory checking results: +Direct leak - 2 +Indirect leak - 1 diff --git a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake index 212bfdb..25bb6a2 100644 --- a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake @@ -30,7 +30,7 @@ unset(CMAKELISTS_EXTRA_CODE) unset(CTEST_EXTRA_CODE) #----------------------------------------------------------------------------- -# add LeakSanitizer test +# add standalone LeakSanitizer test set(CTEST_EXTRA_CODE "set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") ") @@ -38,7 +38,7 @@ set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" -P \"${RunCMake_SOURCE_DIR}/testLeakSanitizer.cmake\") ") -run_mc_test(DummyLeakSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) +run_mc_test(DummyLeakSanitizer "" -DMEMCHECK_TYPE=LeakSanitizer) unset(CMAKELISTS_EXTRA_CODE) unset(CTEST_EXTRA_CODE) @@ -56,6 +56,19 @@ unset(CMAKELISTS_EXTRA_CODE) unset(CTEST_EXTRA_CODE) #----------------------------------------------------------------------------- +# add AddressSanitizer/LeakSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" +-P \"${RunCMake_SOURCE_DIR}/testAddressLeakSanitizer.cmake\") +") +run_mc_test(DummyAddressLeakSanitizer "" -DMEMCHECK_TYPE=AddressSanitizer) +unset(CMAKELISTS_EXTRA_CODE) +unset(CTEST_EXTRA_CODE) + +#----------------------------------------------------------------------------- # add MemorySanitizer test set(CTEST_EXTRA_CODE "set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") @@ -157,7 +170,7 @@ set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" -P \"${RunCMake_SOURCE_DIR}/testLeakSanitizer.cmake\") ") -run_mc_test(DummyLeakSanitizerPrintDefects "" -DMEMCHECK_TYPE=AddressSanitizer) +run_mc_test(DummyLeakSanitizerPrintDefects "" -DMEMCHECK_TYPE=LeakSanitizer) unset(CMAKELISTS_EXTRA_CODE) unset(CTEST_EXTRA_CODE) unset(CTEST_MEMCHECK_ARGS) diff --git a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake similarity index 87% copy from Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake copy to Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake index 02030be..2a57b11 100644 --- a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake +++ b/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake @@ -1,20 +1,20 @@ -# this file simulates a program that has been built with thread sanitizer +# this file simulates a program that has been built with AddressSanitizer # options message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]") string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}") message("LOG_FILE=[${LOG_FILE}]") -# if we are not asked to simulate leak sanitizer don't do it + +# if we are not asked to simulate AddressSanitizer don't do it if(NOT "$ENV{ASAN_OPTIONS}]" MATCHES "simulate_sanitizer.1") return() endif() -# clear the log file +# clear the log files file(REMOVE "${LOG_FILE}.2343") file(REMOVE "${LOG_FILE}.2344") -# create an error of each type of thread santizer -# these names come from tsan_report.cc in llvm +# create an error of each type of LeakSanitizer file(APPEND "${LOG_FILE}.2343" "================================================================= diff --git a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake index 02030be..af214c8 100644 --- a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake +++ b/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake @@ -1,20 +1,20 @@ -# this file simulates a program that has been built with thread sanitizer +# this file simulates a program that has been built with LeakSanitizer # options -message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]") -string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}") +message("LSAN_OPTIONS = [$ENV{LSAN_OPTIONS}]") +string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{LSAN_OPTIONS}") message("LOG_FILE=[${LOG_FILE}]") -# if we are not asked to simulate leak sanitizer don't do it -if(NOT "$ENV{ASAN_OPTIONS}]" MATCHES "simulate_sanitizer.1") + +# if we are not asked to simulate LeakSanitizer don't do it +if(NOT "$ENV{LSAN_OPTIONS}]" MATCHES "simulate_sanitizer.1") return() endif() -# clear the log file +# clear the log files file(REMOVE "${LOG_FILE}.2343") file(REMOVE "${LOG_FILE}.2344") -# create an error of each type of thread santizer -# these names come from tsan_report.cc in llvm +# create an error of each type of LeakSanitizer file(APPEND "${LOG_FILE}.2343" "================================================================= @@ -25,7 +25,7 @@ Direct leak of 4360 byte(s) in 1 object(s) allocated from: #1 0x4823b4 in main /home/kitware/msan/memcheck.cxx:12 #2 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 -SUMMARY: AddressSanitizer: 4436 byte(s) leaked in 2 allocation(s). +SUMMARY: LeakSanitizer: 4436 byte(s) leaked in 2 allocation(s). ") file(APPEND "${LOG_FILE}.2342" "================================================================= @@ -43,5 +43,5 @@ Indirect leak of 76 byte(s) in 1 object(s) allocated from: #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14 #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 -SUMMARY: AddressSanitizer: 4436 byte(s) leaked in 2 allocation(s). +SUMMARY: LeakSanitizer: 4436 byte(s) leaked in 2 allocation(s). ") ----------------------------------------------------------------------- Summary of changes: Help/release/dev/ctest_memcheck-leak_sanitizer.rst | 19 ++++++++++++ Help/variable/CTEST_MEMORYCHECK_TYPE.rst | 2 +- Source/CTest/cmCTestMemCheckHandler.cxx | 31 +++++++++++++++++--- Source/CTest/cmCTestMemCheckHandler.h | 1 + .../DummyAddressLeakSanitizer-result.txt} | 0 .../DummyAddressLeakSanitizer-stderr.txt | 1 + ...ut.txt => DummyAddressLeakSanitizer-stdout.txt} | 0 Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake | 27 ++++++++++++----- ...itizer.cmake => testAddressLeakSanitizer.cmake} | 10 +++---- .../ctest_memcheck/testLeakSanitizer.cmake | 20 ++++++------- 10 files changed, 84 insertions(+), 27 deletions(-) create mode 100644 Help/release/dev/ctest_memcheck-leak_sanitizer.rst copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_memcheck/DummyAddressLeakSanitizer-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stderr.txt copy Tests/RunCMake/ctest_memcheck/{DummyLeakSanitizer-stdout.txt => DummyAddressLeakSanitizer-stdout.txt} (100%) copy Tests/RunCMake/ctest_memcheck/{testLeakSanitizer.cmake => testAddressLeakSanitizer.cmake} (87%) hooks/post-receive -- CMake From brad.king at kitware.com Tue Jan 10 16:47:51 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 10 Jan 2017 16:47:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2030-g55f86ce Message-ID: <20170110214751.72103FA10D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 55f86ceb1f2e5e925a678e9decf181141bb301dc (commit) via ff1602f864a282a7eece0dce6612e33a6a37b265 (commit) from 19e5a8a29816e5f9a61b53a444a127b87c55c12e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55f86ceb1f2e5e925a678e9decf181141bb301dc commit 55f86ceb1f2e5e925a678e9decf181141bb301dc Merge: 19e5a8a ff1602f Author: Brad King AuthorDate: Tue Jan 10 16:47:50 2017 -0500 Commit: CMake Topic Stage CommitDate: Tue Jan 10 16:47:50 2017 -0500 Merge topic 'vs15-detect-from-installer' into next ff1602f8 VS: Port Visual Studio Setup third-party header to older VS versions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff1602f864a282a7eece0dce6612e33a6a37b265 commit ff1602f864a282a7eece0dce6612e33a6a37b265 Author: Brad King AuthorDate: Tue Jan 10 16:45:12 2017 -0500 Commit: Brad King CommitDate: Tue Jan 10 16:47:13 2017 -0500 VS: Port Visual Studio Setup third-party header to older VS versions diff --git a/Utilities/cmvssetup/Setup.Configuration.h b/Utilities/cmvssetup/Setup.Configuration.h index cc01d27..36b8747 100644 --- a/Utilities/cmvssetup/Setup.Configuration.h +++ b/Utilities/cmvssetup/Setup.Configuration.h @@ -23,6 +23,16 @@ #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) +#ifndef _Outptr_result_maybenull_ +#define _Outptr_result_maybenull_ +#endif +#ifndef _Out_writes_to_ +#define _Out_writes_to_(x,y) +#endif +#ifndef _Reserved_ +#define _Reserved_ +#endif + // Enumerations // /// ----------------------------------------------------------------------- Summary of changes: Utilities/cmvssetup/Setup.Configuration.h | 10 ++++++++++ 1 file changed, 10 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jan 11 00:01:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 11 Jan 2017 00:01:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-958-g3e5fbbd Message-ID: <20170111050108.E6550FA6BB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3e5fbbd6cdc472cdf7823cf81c0e527c79653188 (commit) from 914728f8d724e834a402619d05309ad8154ba59d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e5fbbd6cdc472cdf7823cf81c0e527c79653188 commit 3e5fbbd6cdc472cdf7823cf81c0e527c79653188 Author: Kitware Robot AuthorDate: Wed Jan 11 00:01:06 2017 -0500 Commit: Kitware Robot CommitDate: Wed Jan 11 00:01:06 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7a2482a..a5a07dc 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 20170110) +set(CMake_VERSION_PATCH 20170111) #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 Jan 11 09:25:26 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:25:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2032-g0655d61 Message-ID: <20170111142526.E9D41FA737@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 0655d616d6e11b6e490b4cea2f1367caec36c4e2 (commit) via 0c59007843491c178b89ec6b4d318d9a478e6b76 (commit) from 55f86ceb1f2e5e925a678e9decf181141bb301dc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0655d616d6e11b6e490b4cea2f1367caec36c4e2 commit 0655d616d6e11b6e490b4cea2f1367caec36c4e2 Merge: 55f86ce 0c59007 Author: Brad King AuthorDate: Wed Jan 11 09:25:25 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:25:25 2017 -0500 Merge topic 'Autogen_Simplify' into next 0c590078 fixup! AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c59007843491c178b89ec6b4d318d9a478e6b76 commit 0c59007843491c178b89ec6b4d318d9a478e6b76 Author: Brad King AuthorDate: Wed Jan 11 09:24:55 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 09:24:55 2017 -0500 fixup! AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst index c348f3f..56d4ca7 100644 --- a/Help/manual/cmake-qt.7.rst +++ b/Help/manual/cmake-qt.7.rst @@ -152,11 +152,11 @@ result of linking with the :prop_tgt:`IMPORTED` target: Qt5::Widgets ) -.. _`Qt AUTORCC`: - Source files can be excluded from :prop_tgt:`AUTOUIC` processing by enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`. +.. _`Qt AUTORCC`: + AUTORCC ^^^^^^^ ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-qt.7.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:25:59 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:25:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2035-gcae7d6d Message-ID: <20170111142559.D43D9FA74D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via cae7d6db19197200455de775d457d0cbd4bb655d (commit) via 7db05f426e2c3a5b4d1a29ae97f5a75692bc03ac (commit) via 6eabac26f5c8167481be9c872210a8142ead4b99 (commit) from 0655d616d6e11b6e490b4cea2f1367caec36c4e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cae7d6db19197200455de775d457d0cbd4bb655d commit cae7d6db19197200455de775d457d0cbd4bb655d Merge: 0655d61 7db05f4 Author: Brad King AuthorDate: Wed Jan 11 09:25:59 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:25:59 2017 -0500 Merge topic 'Autogen_Simplify' into next 7db05f42 AUTOGEN: Release notes for SKIP_AUTOX 6eabac26 AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7db05f426e2c3a5b4d1a29ae97f5a75692bc03ac commit 7db05f426e2c3a5b4d1a29ae97f5a75692bc03ac Author: Sebastian Holtermann AuthorDate: Mon Jan 2 18:02:53 2017 +0100 Commit: Brad King CommitDate: Wed Jan 11 09:25:48 2017 -0500 AUTOGEN: Release notes for SKIP_AUTOX diff --git a/Help/release/dev/QtAutogen_Skip.rst b/Help/release/dev/QtAutogen_Skip.rst new file mode 100644 index 0000000..37f795c --- /dev/null +++ b/Help/release/dev/QtAutogen_Skip.rst @@ -0,0 +1,12 @@ +QtAutogen_Skip +-------------- + +* The source file properties + :prop_sf:`SKIP_AUTOMOC`, + :prop_sf:`SKIP_AUTOUIC`, + :prop_sf:`SKIP_AUTORCC` and + :prop_sf:`SKIP_AUTOGEN` + allow to exclude files from + :prop_tgt:`AUTOMOC`, + :prop_tgt:`AUTOUIC` and + :prop_tgt:`AUTORCC` processing. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6eabac26f5c8167481be9c872210a8142ead4b99 commit 6eabac26f5c8167481be9c872210a8142ead4b99 Author: Sebastian Holtermann AuthorDate: Mon Jan 2 17:45:17 2017 +0100 Commit: Brad King CommitDate: Wed Jan 11 09:25:48 2017 -0500 AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst index 80b0f49..56d4ca7 100644 --- a/Help/manual/cmake-qt.7.rst +++ b/Help/manual/cmake-qt.7.rst @@ -83,6 +83,9 @@ following targets by setting the :variable:`CMAKE_AUTOMOC` variable. The options to pass to ``moc``. The :variable:`CMAKE_AUTOMOC_MOC_OPTIONS` variable may be populated to pre-set the options for all following targets. +Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by +enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`. + .. _`Qt AUTOUIC`: AUTOUIC @@ -149,6 +152,9 @@ result of linking with the :prop_tgt:`IMPORTED` target: Qt5::Widgets ) +Source files can be excluded from :prop_tgt:`AUTOUIC` processing by +enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`. + .. _`Qt AUTORCC`: AUTORCC @@ -171,6 +177,9 @@ populated to pre-set the options for all following targets. The ``.qrc`` file to set particular options for the file. This overrides options from the :prop_tgt:`AUTORCC_OPTIONS` target property. +Source files can be excluded from :prop_tgt:`AUTORCC` processing by +enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`. + qtmain.lib on Windows ===================== diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst index 30a39b1..b42643f 100644 --- a/Help/prop_tgt/AUTOMOC.rst +++ b/Help/prop_tgt/AUTOMOC.rst @@ -47,5 +47,8 @@ See the documentation for this variable for more details. The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the automoc targets together in an IDE, e.g. in MSVS. +Source C++ files can be excluded from :prop_tgt:`AUTOMOC` processing by +enabling :prop_sf:`SKIP_AUTOMOC` or the broader :prop_sf:`SKIP_AUTOGEN`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTORCC.rst b/Help/prop_tgt/AUTORCC.rst index 158fdf8..1ad0895 100644 --- a/Help/prop_tgt/AUTORCC.rst +++ b/Help/prop_tgt/AUTORCC.rst @@ -24,5 +24,8 @@ generate unspecified unique names for ``rcc``. Therefore if ``Q_INIT_RESOURCE()`` or ``Q_CLEANUP_RESOURCE()`` need to be used the ``.qrc`` file name must be unique. +Source files can be excluded from :prop_tgt:`AUTORCC` processing by +enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. diff --git a/Help/prop_tgt/AUTOUIC.rst b/Help/prop_tgt/AUTOUIC.rst index 4e60ec3..fbf24c3 100644 --- a/Help/prop_tgt/AUTOUIC.rst +++ b/Help/prop_tgt/AUTOUIC.rst @@ -20,5 +20,8 @@ Additional command line options for ``uic`` can be set via the The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the autouic targets together in an IDE, e.g. in MSVS. +Source files can be excluded from :prop_tgt:`AUTOUIC` processing by +enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`. + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:33:03 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:33:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2038-g69d0bac Message-ID: <20170111143303.698D8FA8F3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 69d0bac3bb25152fa0b3c4b23139b2bddb96eed2 (commit) via 6e6253ea88542e9a3c8afc9560f131bc7073ead7 (commit) via 3e5fbbd6cdc472cdf7823cf81c0e527c79653188 (commit) from cae7d6db19197200455de775d457d0cbd4bb655d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69d0bac3bb25152fa0b3c4b23139b2bddb96eed2 commit 69d0bac3bb25152fa0b3c4b23139b2bddb96eed2 Merge: cae7d6d 6e6253e Author: Brad King AuthorDate: Wed Jan 11 09:33:02 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:33:02 2017 -0500 Merge topic 'cmListFileLexer-warning-fix' into next 6e6253ea cmListFileLexer: Fix signature of cmListFileLexer_New 3e5fbbd6 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e6253ea88542e9a3c8afc9560f131bc7073ead7 commit 6e6253ea88542e9a3c8afc9560f131bc7073ead7 Author: Brad King AuthorDate: Wed Jan 11 09:32:00 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 09:32:00 2017 -0500 cmListFileLexer: Fix signature of cmListFileLexer_New Add explicit `(void)` instead of an empty argument list, as suggested by `-Wstrict-prototypes`. diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c index 31faca1..56559f6 100644 --- a/Source/cmListFileLexer.c +++ b/Source/cmListFileLexer.c @@ -2518,7 +2518,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer) } /*--------------------------------------------------------------------------*/ -cmListFileLexer* cmListFileLexer_New() +cmListFileLexer* cmListFileLexer_New(void) { cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); if (!lexer) { diff --git a/Source/cmListFileLexer.h b/Source/cmListFileLexer.h index dfbad5e..c9fb6da 100644 --- a/Source/cmListFileLexer.h +++ b/Source/cmListFileLexer.h @@ -46,7 +46,7 @@ typedef struct cmListFileLexer_s cmListFileLexer; extern "C" { #endif -cmListFileLexer* cmListFileLexer_New(); +cmListFileLexer* cmListFileLexer_New(void); int cmListFileLexer_SetFileName(cmListFileLexer*, const char*, cmListFileLexer_BOM* bom); int cmListFileLexer_SetString(cmListFileLexer*, const char*); diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l index 4b389b9..dd64923 100644 --- a/Source/cmListFileLexer.in.l +++ b/Source/cmListFileLexer.in.l @@ -398,7 +398,7 @@ static void cmListFileLexerDestroy(cmListFileLexer* lexer) } /*--------------------------------------------------------------------------*/ -cmListFileLexer* cmListFileLexer_New() +cmListFileLexer* cmListFileLexer_New(void) { cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); if (!lexer) { ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmListFileLexer.c | 2 +- Source/cmListFileLexer.h | 2 +- Source/cmListFileLexer.in.l | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:41:59 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:41:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2040-g2e8f576 Message-ID: <20170111144159.684B3F998E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2e8f576a9d8b320f420aca2aaf0ac51bf1f8a5c3 (commit) via 6ae52ce4a16a65338c3e6ef44d4f4891667e07d7 (commit) from 69d0bac3bb25152fa0b3c4b23139b2bddb96eed2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e8f576a9d8b320f420aca2aaf0ac51bf1f8a5c3 commit 2e8f576a9d8b320f420aca2aaf0ac51bf1f8a5c3 Merge: 69d0bac 6ae52ce Author: Brad King AuthorDate: Wed Jan 11 09:41:58 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:41:58 2017 -0500 Merge topic 'vs15-detect-from-installer' into next 6ae52ce4 fixup! VS: Port Visual Studio Setup third-party header to older VS versions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ae52ce4a16a65338c3e6ef44d4f4891667e07d7 commit 6ae52ce4a16a65338c3e6ef44d4f4891667e07d7 Author: Brad King AuthorDate: Wed Jan 11 09:41:48 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 09:41:48 2017 -0500 fixup! VS: Port Visual Studio Setup third-party header to older VS versions diff --git a/Utilities/cmvssetup/Setup.Configuration.h b/Utilities/cmvssetup/Setup.Configuration.h index 36b8747..6c9d8f9 100644 --- a/Utilities/cmvssetup/Setup.Configuration.h +++ b/Utilities/cmvssetup/Setup.Configuration.h @@ -32,6 +32,9 @@ #ifndef _Reserved_ #define _Reserved_ #endif +#ifndef MAXUINT +#define MAXUINT ((UINT)~((UINT)0)) +#endif // Enumerations // ----------------------------------------------------------------------- Summary of changes: Utilities/cmvssetup/Setup.Configuration.h | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:45:13 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:45:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2042-g3f697a7 Message-ID: <20170111144513.0FD0FF9F21@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3f697a732c4d737fa319020e435f43d973a29901 (commit) via 3a97a3713a498c9a89a1733131196f7fcd03552c (commit) from 2e8f576a9d8b320f420aca2aaf0ac51bf1f8a5c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f697a732c4d737fa319020e435f43d973a29901 commit 3f697a732c4d737fa319020e435f43d973a29901 Merge: 2e8f576 3a97a37 Author: Brad King AuthorDate: Wed Jan 11 09:45:12 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:45:12 2017 -0500 Merge topic 'vs15-detect-from-installer' into next 3a97a371 VS: Port Visual Studio Setup third-party header to older VS versions https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a97a3713a498c9a89a1733131196f7fcd03552c commit 3a97a3713a498c9a89a1733131196f7fcd03552c Author: Brad King AuthorDate: Tue Jan 10 16:45:12 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 09:45:05 2017 -0500 VS: Port Visual Studio Setup third-party header to older VS versions diff --git a/Utilities/cmvssetup/Setup.Configuration.h b/Utilities/cmvssetup/Setup.Configuration.h index cc01d27..6c9d8f9 100644 --- a/Utilities/cmvssetup/Setup.Configuration.h +++ b/Utilities/cmvssetup/Setup.Configuration.h @@ -23,6 +23,19 @@ #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) +#ifndef _Outptr_result_maybenull_ +#define _Outptr_result_maybenull_ +#endif +#ifndef _Out_writes_to_ +#define _Out_writes_to_(x,y) +#endif +#ifndef _Reserved_ +#define _Reserved_ +#endif +#ifndef MAXUINT +#define MAXUINT ((UINT)~((UINT)0)) +#endif + // Enumerations // /// ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:13 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-960-g22dfda1 Message-ID: <20170111145813.C5849FA530@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 22dfda11121c2b0c2374a5eb29fd3a2f140ff92c (commit) via ff91b1514be75dee07e8009a60ad39284e8844b4 (commit) from 3e5fbbd6cdc472cdf7823cf81c0e527c79653188 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22dfda11121c2b0c2374a5eb29fd3a2f140ff92c commit 22dfda11121c2b0c2374a5eb29fd3a2f140ff92c Merge: 3e5fbbd ff91b15 Author: Brad King AuthorDate: Wed Jan 11 09:58:11 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:11 2017 -0500 Merge topic 'FindBoost-find-default' ff91b151 FindBoost: Search official location of prebuilt binaries on Windows ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:16 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-963-g1406408 Message-ID: <20170111145816.AA98CFA538@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1406408e61a001728eded5a7f28f3c392ff31c38 (commit) via 8deb913d983eee5ad1439ccb98244817d8912602 (commit) via eadd395a1396ed78a3ecea7740f8f4735ab84453 (commit) from 22dfda11121c2b0c2374a5eb29fd3a2f140ff92c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1406408e61a001728eded5a7f28f3c392ff31c38 commit 1406408e61a001728eded5a7f28f3c392ff31c38 Merge: 22dfda1 8deb913 Author: Brad King AuthorDate: Wed Jan 11 09:58:14 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:14 2017 -0500 Merge topic 'FindGTest-fixups' 8deb913d FindGTest: add lib search path for MSVC x64 platform eadd395a FindGTest: Fix documented GTEST_MSVC_SEARCH default value ----------------------------------------------------------------------- Summary of changes: Modules/FindGTest.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:19 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-965-ga8b5762 Message-ID: <20170111145821.4C3BDFA53F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a8b576244f729e543795750eb6c9e188c0e1fe66 (commit) via a9b93501d435bcd30a96e3091255e509fedbb39f (commit) from 1406408e61a001728eded5a7f28f3c392ff31c38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8b576244f729e543795750eb6c9e188c0e1fe66 commit a8b576244f729e543795750eb6c9e188c0e1fe66 Merge: 1406408 a9b9350 Author: Brad King AuthorDate: Wed Jan 11 09:58:17 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:17 2017 -0500 Merge topic 'FindBoost-1.63' a9b93501 FindBoost: Add support for 1.63 ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:24 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-967-g396e937 Message-ID: <20170111145824.BA70FFA537@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 396e9378a820cc5216aecce6bff42f526f4f7c26 (commit) via 5ffee691ee0c55d043238960cf1149cbcfb86047 (commit) from a8b576244f729e543795750eb6c9e188c0e1fe66 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=396e9378a820cc5216aecce6bff42f526f4f7c26 commit 396e9378a820cc5216aecce6bff42f526f4f7c26 Merge: a8b5762 5ffee69 Author: Brad King AuthorDate: Wed Jan 11 09:58:22 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:22 2017 -0500 Merge topic 'pgsql-yum' 5ffee691 FindPostgreSQL: automatically find installations from yum.postgresql.org ----------------------------------------------------------------------- Summary of changes: Modules/FindPostgreSQL.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:28 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:28 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-969-gff6a034 Message-ID: <20170111145828.072C8FA540@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ff6a034e0bb7731c97a90afec849d8c80e2a783d (commit) via 696339a9d571ff7d37222296164dd738a6a2b042 (commit) from 396e9378a820cc5216aecce6bff42f526f4f7c26 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff6a034e0bb7731c97a90afec849d8c80e2a783d commit ff6a034e0bb7731c97a90afec849d8c80e2a783d Merge: 396e937 696339a Author: Brad King AuthorDate: Wed Jan 11 09:58:25 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:25 2017 -0500 Merge topic 'FindOpenSSL-check-both' 696339a9 FindOpenSSL: Check that both CRYPTO and SSL libraries are present ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenSSL.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:31 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-971-g0884c9e Message-ID: <20170111145831.15CB1FA559@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 0884c9e46a108e8d7b52f6d96242f147ab12d001 (commit) via 154def305e7a95d9280573b053170b17539c9f69 (commit) from ff6a034e0bb7731c97a90afec849d8c80e2a783d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0884c9e46a108e8d7b52f6d96242f147ab12d001 commit 0884c9e46a108e8d7b52f6d96242f147ab12d001 Merge: ff6a034 154def3 Author: Brad King AuthorDate: Wed Jan 11 09:58:28 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:28 2017 -0500 Merge topic 'SublimeText-no-VERBOSE' 154def30 Sublime: Do not build with verbose output ----------------------------------------------------------------------- Summary of changes: Help/release/dev/SublimeText-no-VERBOSE.rst | 6 ++++++ Source/cmExtraSublimeTextGenerator.cxx | 12 +++--------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 Help/release/dev/SublimeText-no-VERBOSE.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:33 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-973-g3474559 Message-ID: <20170111145833.DA347FA562@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 34745595c3b87279b92ea402fd2ccb6351344307 (commit) via 3578e86272b16b303edd640f29781dd316a857a4 (commit) from 0884c9e46a108e8d7b52f6d96242f147ab12d001 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34745595c3b87279b92ea402fd2ccb6351344307 commit 34745595c3b87279b92ea402fd2ccb6351344307 Merge: 0884c9e 3578e86 Author: Brad King AuthorDate: Wed Jan 11 09:58:31 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:31 2017 -0500 Merge topic 'issue-16513-concrt140-dll' 3578e862 InstallRequiredSystemLibraries: Add concrt*.dll for VC >= 14.0 ----------------------------------------------------------------------- Summary of changes: Modules/InstallRequiredSystemLibraries.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:36 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-975-g445ab80 Message-ID: <20170111145836.A292EFA563@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 445ab80c444b1f5d2800784f85601976867df411 (commit) via 513ef514e51702bf7775f79119f8e3e39ccbb784 (commit) from 34745595c3b87279b92ea402fd2ccb6351344307 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=445ab80c444b1f5d2800784f85601976867df411 commit 445ab80c444b1f5d2800784f85601976867df411 Merge: 3474559 513ef51 Author: Brad King AuthorDate: Wed Jan 11 09:58:34 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:34 2017 -0500 Merge topic 'AndroidTestUtilities-fix-cleanup' 513ef514 AndroidTestUtilities: fix cleanup operation ----------------------------------------------------------------------- Summary of changes: Modules/AndroidTestUtilities/PushToAndroidDevice.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:39 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-977-gd1682a8 Message-ID: <20170111145839.88C1EFA559@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via d1682a8514f9ecbe91f59e651be917afec044907 (commit) via 524f5ee186f95a0dc0dc449e437910a72b175893 (commit) from 445ab80c444b1f5d2800784f85601976867df411 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1682a8514f9ecbe91f59e651be917afec044907 commit d1682a8514f9ecbe91f59e651be917afec044907 Merge: 445ab80 524f5ee Author: Brad King AuthorDate: Wed Jan 11 09:58:37 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:37 2017 -0500 Merge topic 'android_clang_asm' 524f5ee1 Android: Set compiler target platform when compiling ASM with Clang ----------------------------------------------------------------------- Summary of changes: .../Platform/{Android-Clang-C.cmake => Android-Clang-ASM.cmake} | 2 +- Modules/Platform/Android-Clang.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) copy Modules/Platform/{Android-Clang-C.cmake => Android-Clang-ASM.cmake} (51%) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:42 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:42 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1010-g2eb5596 Message-ID: <20170111145842.73740FA53F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2eb5596503ab8cf2f5ded140d45aa013c9705436 (commit) via 7db05f426e2c3a5b4d1a29ae97f5a75692bc03ac (commit) via 6eabac26f5c8167481be9c872210a8142ead4b99 (commit) via cbc07d331d1d5429dc1e0b7c6c7949ff8d9efdf1 (commit) via c17e0a3ad58f06fcb0827910af520405670b3d51 (commit) via 53787bf8de2d3981f650e9036bb89cb6ed884a75 (commit) via 8dbdd3e726ead25c179e6eb4ffab212a1db3aba8 (commit) via 0699760d5c8b644242ddd4ac6d07d8c4c68f2b94 (commit) via a84f0bb726ebcc8e9bf3db0b99e5b6fd8a720045 (commit) via 7b766b83952ec4c431a55d2f6e589a5f806834c9 (commit) via 2964b8cca4155fa318722f6ef17f0d4d56ee2f29 (commit) via d58b6bf31c18cfedd4a2f15e009b8e5cbdc21b6e (commit) via 94c319f93309ff4cddd0280cdcbd48b50492db36 (commit) via 966be439e07131c3ff84175c1a9e3b6336908d8e (commit) via de531432887487943dbe4ae5a1bde762d5582e06 (commit) via d8e45536fb3637454cf17a638dcd9fc236e94660 (commit) via d9313a82906ced0ff3c76828e86d9d7a248a5e49 (commit) via 32d3540e090c4a24d55b99c49c094a9cb574c9b3 (commit) via e7280a7f1743d73cdab41ed709a9e1d0f99b6342 (commit) via 63d3ca4c1cab0c7b9c71d6c051c3b4c053eb7627 (commit) via 6ae19bf32e232beb59a0c427d82c0761e8248ab8 (commit) via 9986da4f0f2f49c0d7d260f9d21deaa906708376 (commit) via d51cc88e844c78c01c1616e6a2fb102c0682dd00 (commit) via cf1d5a9cdba49a2e9f08879d756ae118b22bfc6a (commit) via f962275987e17cf94da663a919f52b6d0c8f44f4 (commit) via c736c41ad192c89e1c74751a8f401c75955f5f3b (commit) via cbd650c2642e40369eaa53d20dafee6cdccae4af (commit) via 0b1527ff3d1781380756ee72a9641b7c5c7c87cc (commit) via 2b9d795e63acf723a6abd79f3195ec70476442a5 (commit) via 2cfcdf757d032cdea8b980792007a6f9d749e6fb (commit) via 2f67aef23d4192fadb222dc79311fb5ffbbc36ce (commit) via 794fdf40a1bc85dded519d7c737f73690e3a6e42 (commit) via a1e49bb155132606ed9f590c0b62e68f2e288d0b (commit) from d1682a8514f9ecbe91f59e651be917afec044907 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2eb5596503ab8cf2f5ded140d45aa013c9705436 commit 2eb5596503ab8cf2f5ded140d45aa013c9705436 Merge: d1682a8 7db05f4 Author: Brad King AuthorDate: Wed Jan 11 09:58:40 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:40 2017 -0500 Merge topic 'Autogen_Simplify' 7db05f42 AUTOGEN: Release notes for SKIP_AUTOX 6eabac26 AUTOGEN: Documentation update: cmake-qt, AUTOMOC, AUTOUIC, AUTORCC cbc07d33 AUTOGEN: Documentation for SKIP_AUTOX source file properties c17e0a3a AUTOGEN: Tests: AUTORCC SKIP_AUTORCC and SKIP_AUTOGEN test 53787bf8 AUTOGEN: Tests: AUTOUIC SKIP_AUTOUIC and SKIP_AUTOGEN test 8dbdd3e7 AUTOGEN: Tests: AUTOMOC SKIP_AUTOMOC and SKIP_AUTOGEN test 0699760d AUTOGEN: Generators: Do moc/uic skip test during file list generation a84f0bb7 AUTOGEN: Generators: Message upper/lower case unification 7b766b83 AUTOGEN: Generators: Use single moc/uic skip test method only 2964b8cc AUTOGEN: Generators: Use AUTOMOC/UIC/RCC instead of AUTOGEN in messages d58b6bf3 AUTOGEN: Generators: Moc/UicSkipTest methods 94c319f9 AUTOGEN: Generators: Use separate header lists for MOC and UIC 966be439 AUTOGEN: Generators: Be verbose about skipping files de531432 AUTOGEN: Generators: Remove unused variable d8e45536 AUTOGEN: Initializer: Always remember skipped files d9313a82 AUTOGEN: Initializer: Enable SKIP_AUTOGEN on all AUTOGEN generated sources ... ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 4 + Help/manual/cmake-qt.7.rst | 9 + Help/prop_sf/SKIP_AUTOGEN.rst | 8 + Help/prop_sf/SKIP_AUTOMOC.rst | 6 + Help/prop_sf/SKIP_AUTORCC.rst | 6 + Help/prop_sf/SKIP_AUTOUIC.rst | 6 + Help/prop_tgt/AUTOMOC.rst | 3 + Help/prop_tgt/AUTORCC.rst | 3 + Help/prop_tgt/AUTOUIC.rst | 3 + Help/release/dev/QtAutogen_Skip.rst | 12 + Modules/AutogenInfo.cmake.in | 8 +- Source/cmQtAutoGeneratorInitializer.cxx | 102 ++-- Source/cmQtAutoGenerators.cxx | 741 ++++++++++++-------------- Source/cmQtAutoGenerators.h | 46 +- Tests/QtAutogen/CMakeLists.txt | 63 +++ Tests/QtAutogen/skipMoc.cpp | 14 + Tests/QtAutogen/skipRcc.cpp | 9 + Tests/QtAutogen/skipSource/qItemA.cpp | 5 + Tests/QtAutogen/skipSource/qItemA.hpp | 13 + Tests/QtAutogen/skipSource/qItemB.cpp | 5 + Tests/QtAutogen/skipSource/qItemB.hpp | 13 + Tests/QtAutogen/skipSource/qItemC.cpp | 5 + Tests/QtAutogen/skipSource/qItemC.hpp | 13 + Tests/QtAutogen/skipSource/skipRccBad1.qrc | 5 + Tests/QtAutogen/skipSource/skipRccBad2.qrc | 5 + Tests/QtAutogen/skipSource/skipRccGood.qrc | 6 + Tests/QtAutogen/skipSource/skipUicGen.cpp | 7 + Tests/QtAutogen/skipSource/skipUicGen.hpp | 8 + Tests/QtAutogen/skipSource/skipUicNoGen1.cpp | 7 + Tests/QtAutogen/skipSource/skipUicNoGen1.hpp | 8 + Tests/QtAutogen/skipSource/skipUicNoGen2.cpp | 7 + Tests/QtAutogen/skipSource/skipUicNoGen2.hpp | 8 + Tests/QtAutogen/skipSource/ui_nogen1.h | 6 + Tests/QtAutogen/skipSource/ui_nogen2.h | 6 + Tests/QtAutogen/skipSource/uigen1.ui | 24 + Tests/QtAutogen/skipSource/uigen2.ui | 24 + Tests/QtAutogen/skipUic.cpp | 22 + 37 files changed, 782 insertions(+), 458 deletions(-) create mode 100644 Help/prop_sf/SKIP_AUTOGEN.rst create mode 100644 Help/prop_sf/SKIP_AUTOMOC.rst create mode 100644 Help/prop_sf/SKIP_AUTORCC.rst create mode 100644 Help/prop_sf/SKIP_AUTOUIC.rst create mode 100644 Help/release/dev/QtAutogen_Skip.rst create mode 100644 Tests/QtAutogen/skipMoc.cpp create mode 100644 Tests/QtAutogen/skipRcc.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemA.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemA.hpp create mode 100644 Tests/QtAutogen/skipSource/qItemB.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemB.hpp create mode 100644 Tests/QtAutogen/skipSource/qItemC.cpp create mode 100644 Tests/QtAutogen/skipSource/qItemC.hpp create mode 100644 Tests/QtAutogen/skipSource/skipRccBad1.qrc create mode 100644 Tests/QtAutogen/skipSource/skipRccBad2.qrc create mode 100644 Tests/QtAutogen/skipSource/skipRccGood.qrc create mode 100644 Tests/QtAutogen/skipSource/skipUicGen.cpp create mode 100644 Tests/QtAutogen/skipSource/skipUicGen.hpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen1.cpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen1.hpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen2.cpp create mode 100644 Tests/QtAutogen/skipSource/skipUicNoGen2.hpp create mode 100644 Tests/QtAutogen/skipSource/ui_nogen1.h create mode 100644 Tests/QtAutogen/skipSource/ui_nogen2.h create mode 100644 Tests/QtAutogen/skipSource/uigen1.ui create mode 100644 Tests/QtAutogen/skipSource/uigen2.ui create mode 100644 Tests/QtAutogen/skipUic.cpp hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:45 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1012-g039588e Message-ID: <20170111145845.B8CC7FA558@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 039588e335fbf559f66719aff2a3c8920a078261 (commit) via af77368ed3d81c877fc19a64831aff380cf4646e (commit) from 2eb5596503ab8cf2f5ded140d45aa013c9705436 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=039588e335fbf559f66719aff2a3c8920a078261 commit 039588e335fbf559f66719aff2a3c8920a078261 Merge: 2eb5596 af77368 Author: Brad King AuthorDate: Wed Jan 11 09:58:43 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:43 2017 -0500 Merge topic 'cpack-rpm-user-binary-spec-file-test' af77368e CPack/RPM test for using custom binary spec file ----------------------------------------------------------------------- Summary of changes: Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + .../CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake | 9 +++ .../RPM-COMPONENT-stderr.txt | 2 + .../RPM-MONOLITHIC-stderr.txt | 1 + .../tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in | 80 ++++++++++++++++++++ .../CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake | 9 +++ 6 files changed, 102 insertions(+) create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-COMPONENT-stderr.txt create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/RPM-MONOLITHIC-stderr.txt create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/custom.spec.in create mode 100644 Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/test.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:48 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1014-g474edf7 Message-ID: <20170111145848.9DB5DFA562@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 474edf75f6234a9ed3b59b7e11c53d57f9bd2f78 (commit) via b1dc4ddbdd651e8bdd30878fa9afc840d97c9114 (commit) from 039588e335fbf559f66719aff2a3c8920a078261 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=474edf75f6234a9ed3b59b7e11c53d57f9bd2f78 commit 474edf75f6234a9ed3b59b7e11c53d57f9bd2f78 Merge: 039588e b1dc4dd Author: Brad King AuthorDate: Wed Jan 11 09:58:46 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:46 2017 -0500 Merge topic 'BundleUtilities-symlink-structure' b1dc4ddb BundleUtilities: Maintain symlink structure ----------------------------------------------------------------------- Summary of changes: Modules/BundleUtilities.cmake | 58 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:51 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1017-gbc2cc80 Message-ID: <20170111145851.7B57DFA564@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via bc2cc80255c64bc2b2fa4c9dbb54f5cd90150982 (commit) via b7f0b1240f9c251d059fafcde878168f2b9a6664 (commit) via ba8bb32162ae7bc42c4a3a521a4e4b98274d9d8e (commit) from 474edf75f6234a9ed3b59b7e11c53d57f9bd2f78 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc2cc80255c64bc2b2fa4c9dbb54f5cd90150982 commit bc2cc80255c64bc2b2fa4c9dbb54f5cd90150982 Merge: 474edf7 b7f0b12 Author: Brad King AuthorDate: Wed Jan 11 09:58:49 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:49 2017 -0500 Merge topic 'solaris-build-fixes' b7f0b124 libuv requires _XOPEN_SOURCE 600 on Solaris 11 ba8bb321 Disable libuv on Solaris 10 ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 3 +++ Utilities/cmlibuv/CMakeLists.txt | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:54 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1019-g9a67022 Message-ID: <20170111145854.56501FA564@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9a670222758bff23645df36a5cb9d98cb1bafa8e (commit) via b8968b4b3984b425497324c302948a197b2badbd (commit) from bc2cc80255c64bc2b2fa4c9dbb54f5cd90150982 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a670222758bff23645df36a5cb9d98cb1bafa8e commit 9a670222758bff23645df36a5cb9d98cb1bafa8e Merge: bc2cc80 b8968b4 Author: Brad King AuthorDate: Wed Jan 11 09:58:52 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:52 2017 -0500 Merge topic 'UseSWIG-implicit-depends' b8968b4b UseSWIG: Automatically scan dependencies of SWIG files for Makefiles ----------------------------------------------------------------------- Summary of changes: Copyright.txt | 2 ++ Modules/UseSWIG.cmake | 1 + Source/cmDependsC.cxx | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 09:58:57 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 09:58:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1024-g12d5ccd Message-ID: <20170111145857.9B86CFA565@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 12d5ccd10a451301bf3cbdefe8fde744bf6c9467 (commit) via e537bd91129fc1616f787b64024f1b08d0f7ae45 (commit) via 0a2e588585a951b1f26cfa9094e0709f1d026b1e (commit) via cdacfbd255dcf640be7dd4971a1be616d015b3fd (commit) via cf590c1236e40eaff9fe76ec918fad33df4f6be4 (commit) from 9a670222758bff23645df36a5cb9d98cb1bafa8e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12d5ccd10a451301bf3cbdefe8fde744bf6c9467 commit 12d5ccd10a451301bf3cbdefe8fde744bf6c9467 Merge: 9a67022 e537bd9 Author: Brad King AuthorDate: Wed Jan 11 09:58:55 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 09:58:55 2017 -0500 Merge topic 'ctest_memcheck-leak_sanitizer' e537bd91 ctest_memcheck: do not add detect_leaks=1 to ASAN_OPTIONS 0a2e5885 ctest_memcheck: join *SAN_OPTIONS with : cdacfbd2 MEMORYCHECK_SUPPRESSIONS_FILE: add support for sanitizers cf590c12 ctest_memcheck: add support for standalone LeakSanitizer ----------------------------------------------------------------------- Summary of changes: Help/release/dev/ctest_memcheck-leak_sanitizer.rst | 19 ++++++++++++ Help/variable/CTEST_MEMORYCHECK_TYPE.rst | 2 +- Source/CTest/cmCTestMemCheckHandler.cxx | 31 +++++++++++++++++--- Source/CTest/cmCTestMemCheckHandler.h | 1 + .../DummyAddressLeakSanitizer-result.txt} | 0 .../DummyAddressLeakSanitizer-stderr.txt | 1 + ...ut.txt => DummyAddressLeakSanitizer-stdout.txt} | 0 Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake | 27 ++++++++++++----- ...itizer.cmake => testAddressLeakSanitizer.cmake} | 10 +++---- .../ctest_memcheck/testLeakSanitizer.cmake | 20 ++++++------- 10 files changed, 84 insertions(+), 27 deletions(-) create mode 100644 Help/release/dev/ctest_memcheck-leak_sanitizer.rst copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_memcheck/DummyAddressLeakSanitizer-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-stderr.txt copy Tests/RunCMake/ctest_memcheck/{DummyLeakSanitizer-stdout.txt => DummyAddressLeakSanitizer-stdout.txt} (100%) copy Tests/RunCMake/ctest_memcheck/{testLeakSanitizer.cmake => testAddressLeakSanitizer.cmake} (87%) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:02:39 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:02:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2058-g016ec96 Message-ID: <20170111150239.375E1FA5D2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 016ec962653d5f2060ebf05d09ecddc13deb0cab (commit) via 12d5ccd10a451301bf3cbdefe8fde744bf6c9467 (commit) via 9a670222758bff23645df36a5cb9d98cb1bafa8e (commit) via bc2cc80255c64bc2b2fa4c9dbb54f5cd90150982 (commit) via 474edf75f6234a9ed3b59b7e11c53d57f9bd2f78 (commit) via 039588e335fbf559f66719aff2a3c8920a078261 (commit) via 2eb5596503ab8cf2f5ded140d45aa013c9705436 (commit) via d1682a8514f9ecbe91f59e651be917afec044907 (commit) via 445ab80c444b1f5d2800784f85601976867df411 (commit) via 34745595c3b87279b92ea402fd2ccb6351344307 (commit) via 0884c9e46a108e8d7b52f6d96242f147ab12d001 (commit) via ff6a034e0bb7731c97a90afec849d8c80e2a783d (commit) via 396e9378a820cc5216aecce6bff42f526f4f7c26 (commit) via a8b576244f729e543795750eb6c9e188c0e1fe66 (commit) via 1406408e61a001728eded5a7f28f3c392ff31c38 (commit) via 22dfda11121c2b0c2374a5eb29fd3a2f140ff92c (commit) from 3f697a732c4d737fa319020e435f43d973a29901 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=016ec962653d5f2060ebf05d09ecddc13deb0cab commit 016ec962653d5f2060ebf05d09ecddc13deb0cab Merge: 3f697a7 12d5ccd Author: Brad King AuthorDate: Wed Jan 11 10:02:26 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 10:02:26 2017 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:26:49 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:26:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2060-g7f3e966 Message-ID: <20170111152649.5B0E3FA74E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7f3e96623e6d1bc22e447926926409c2836e7d6a (commit) via 5fddbf1382f9eca0354404ad062343da61cfc84a (commit) from 016ec962653d5f2060ebf05d09ecddc13deb0cab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f3e96623e6d1bc22e447926926409c2836e7d6a commit 7f3e96623e6d1bc22e447926926409c2836e7d6a Merge: 016ec96 5fddbf1 Author: Brad King AuthorDate: Wed Jan 11 10:26:48 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 10:26:48 2017 -0500 Merge topic 'cuda-windows' into next 5fddbf13 fixup! CUDA: Port test cases to Windows with MSVC host compiler https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fddbf1382f9eca0354404ad062343da61cfc84a commit 5fddbf1382f9eca0354404ad062343da61cfc84a Author: Brad King AuthorDate: Wed Jan 11 10:10:17 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 10:25:21 2017 -0500 fixup! CUDA: Port test cases to Windows with MSVC host compiler diff --git a/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake new file mode 100644 index 0000000..ea22152 --- /dev/null +++ b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake @@ -0,0 +1,9 @@ +enable_language(CUDA) +try_compile(result ${CMAKE_CURRENT_BINARY_DIR} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.cu + CUDA_STANDARD 3 # bogus, but not used + OUTPUT_VARIABLE out + ) +if(NOT result) + message(FATAL_ERROR "try_compile failed:\n${out}") +endif() diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 5452e6d..6a1bc64 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -36,7 +36,11 @@ elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT) run_cmake(CxxStandardNoDefault) endif() if(CMake_TEST_CUDA) - run_cmake(CudaStandard) + if(CMAKE_HOST_WIN32) + run_cmake(CudaStandardNoDefault) + else() + run_cmake(CudaStandard) + endif() endif() if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) run_cmake(CStandardGNU) ----------------------------------------------------------------------- Summary of changes: .../{CxxStandardNoDefault.cmake => CudaStandardNoDefault.cmake} | 6 +++--- Tests/RunCMake/try_compile/RunCMakeTest.cmake | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) copy Tests/RunCMake/try_compile/{CxxStandardNoDefault.cmake => CudaStandardNoDefault.cmake} (58%) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:27:29 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:27:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2063-g374e984 Message-ID: <20170111152729.032CAFA769@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 374e984b7e143008d38b7d148b1700cadbccbb59 (commit) via 097ac761334e18758e7f81ec46486ea200317eec (commit) via cdd559eab5df6972ce89dbc6e24b6ab1b6081254 (commit) from 7f3e96623e6d1bc22e447926926409c2836e7d6a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=374e984b7e143008d38b7d148b1700cadbccbb59 commit 374e984b7e143008d38b7d148b1700cadbccbb59 Merge: 7f3e966 097ac76 Author: Brad King AuthorDate: Wed Jan 11 10:27:28 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 10:27:28 2017 -0500 Merge topic 'cuda-windows' into next 097ac761 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls cdd559ea CUDA: Port test cases to Windows with MSVC host compiler https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=097ac761334e18758e7f81ec46486ea200317eec commit 097ac761334e18758e7f81ec46486ea200317eec Author: Brad King AuthorDate: Thu Dec 15 15:17:08 2016 -0500 Commit: Brad King CommitDate: Wed Jan 11 10:26:54 2017 -0500 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls Uncomment the calls in `main.cpp` (and fix the signatures). diff --git a/Tests/CudaOnly/SeparateCompilation/main.cu b/Tests/CudaOnly/SeparateCompilation/main.cu index d4520ae..5c8e150 100644 --- a/Tests/CudaOnly/SeparateCompilation/main.cu +++ b/Tests/CudaOnly/SeparateCompilation/main.cu @@ -4,12 +4,12 @@ #include "file1.h" #include "file2.h" -// result_type file4_launch_kernel(int x); -// result_type file5_launch_kernel(int x); +int file4_launch_kernel(int x); +int file5_launch_kernel(int x); int main(int argc, char **argv) { - // file4_launch_kernel(42); - // file5_launch_kernel(42); + file4_launch_kernel(42); + file5_launch_kernel(42); return 0; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cdd559eab5df6972ce89dbc6e24b6ab1b6081254 commit cdd559eab5df6972ce89dbc6e24b6ab1b6081254 Author: Brad King AuthorDate: Wed Dec 7 11:45:44 2016 -0500 Commit: Brad King CommitDate: Wed Jan 11 10:26:53 2017 -0500 CUDA: Port test cases to Windows with MSVC host compiler diff --git a/Tests/Cuda/Complex/dynamic.cpp b/Tests/Cuda/Complex/dynamic.cpp index d579f1e..3848ce7 100644 --- a/Tests/Cuda/Complex/dynamic.cpp +++ b/Tests/Cuda/Complex/dynamic.cpp @@ -1,5 +1,11 @@ -int dynamic_base_func(int x) +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + +EXPORT int dynamic_base_func(int x) { return x * x; } diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu index ea52acb..a23dc25 100644 --- a/Tests/Cuda/Complex/dynamic.cu +++ b/Tests/Cuda/Complex/dynamic.cu @@ -3,9 +3,15 @@ #include #include +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + int dynamic_base_func(int); -int __host__ cuda_dynamic_host_func(int x) +EXPORT int __host__ cuda_dynamic_host_func(int x) { return dynamic_base_func(x); } @@ -16,7 +22,7 @@ void DetermineIfValidCudaDevice() { } -void cuda_dynamic_lib_func() +EXPORT void cuda_dynamic_lib_func() { DetermineIfValidCudaDevice <<<1,1>>> (); cudaError_t err = cudaGetLastError(); diff --git a/Tests/Cuda/Complex/main.cpp b/Tests/Cuda/Complex/main.cpp index 32312d0..5a3f820 100644 --- a/Tests/Cuda/Complex/main.cpp +++ b/Tests/Cuda/Complex/main.cpp @@ -3,8 +3,14 @@ #include "file1.h" #include "file2.h" -int call_cuda_seperable_code(int x); -int mixed_launch_kernel(int x); +#ifdef _WIN32 +#define IMPORT __declspec(dllimport) +#else +#define IMPORT +#endif + +IMPORT int call_cuda_seperable_code(int x); +IMPORT int mixed_launch_kernel(int x); int main(int argc, char** argv) { diff --git a/Tests/Cuda/Complex/mixed.cpp b/Tests/Cuda/Complex/mixed.cpp index 205f091..bd32e51 100644 --- a/Tests/Cuda/Complex/mixed.cpp +++ b/Tests/Cuda/Complex/mixed.cpp @@ -1,6 +1,14 @@ +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#define IMPORT __declspec(dllimport) +#else +#define EXPORT +#define IMPORT +#endif + int dynamic_base_func(int); -int cuda_dynamic_host_func(int); +IMPORT int cuda_dynamic_host_func(int); int file3_launch_kernel(int); int dynamic_final_func(int x) @@ -8,7 +16,7 @@ int dynamic_final_func(int x) return cuda_dynamic_host_func(dynamic_base_func(x)); } -int call_cuda_seperable_code(int x) +EXPORT int call_cuda_seperable_code(int x) { return file3_launch_kernel(x); } diff --git a/Tests/Cuda/Complex/mixed.cu b/Tests/Cuda/Complex/mixed.cu index 45b412f..7051de0 100644 --- a/Tests/Cuda/Complex/mixed.cu +++ b/Tests/Cuda/Complex/mixed.cu @@ -4,10 +4,18 @@ #include "file1.h" #include "file2.h" +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#define IMPORT __declspec(dllimport) +#else +#define EXPORT +#define IMPORT +#endif + result_type __device__ file1_func(int x); result_type_dynamic __device__ file2_func(int x); -void __host__ cuda_dynamic_lib_func(); +IMPORT void __host__ cuda_dynamic_lib_func(); static __global__ @@ -17,7 +25,7 @@ void mixed_kernel(result_type& r, int x) result_type_dynamic rd = file2_func(x); } -int mixed_launch_kernel(int x) +EXPORT int mixed_launch_kernel(int x) { cuda_dynamic_lib_func(); diff --git a/Tests/CudaOnly/EnableStandard/main.cu b/Tests/CudaOnly/EnableStandard/main.cu index 83e9dfd..f7144e6 100644 --- a/Tests/CudaOnly/EnableStandard/main.cu +++ b/Tests/CudaOnly/EnableStandard/main.cu @@ -1,8 +1,14 @@ #include +#ifdef _WIN32 +#define IMPORT __declspec(dllimport) +#else +#define IMPORT +#endif + int static_cuda11_func(int); -int shared_cuda11_func(int); +IMPORT int shared_cuda11_func(int); void test_functions() { diff --git a/Tests/CudaOnly/EnableStandard/shared.cu b/Tests/CudaOnly/EnableStandard/shared.cu index 28555b3..ccdd0b2 100644 --- a/Tests/CudaOnly/EnableStandard/shared.cu +++ b/Tests/CudaOnly/EnableStandard/shared.cu @@ -1,9 +1,15 @@ #include +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + using tt = std::true_type; using ft = std::false_type; -int __host__ shared_cuda11_func(int x) +EXPORT int __host__ shared_cuda11_func(int x) { return x * x + std::integral_constant::value; } diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index c4ca8b9..6c4011c 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -4,7 +4,12 @@ project (CudaOnlyWithDefs CUDA) #verify that we can pass explicit cuda arch flags set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30") -set(debug_compile_flags --generate-code arch=compute_20,code=sm_20 -Xcompiler=-Werror) +set(debug_compile_flags --generate-code arch=compute_20,code=sm_20) +if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + list(APPEND debug_compile_flags -Xcompiler=-WX) +else() + list(APPEND debug_compile_flags -Xcompiler=-Werror) +endif() set(release_compile_defs DEFREL) #Goal for this example: diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu index 33a49d2..67bf10c 100644 --- a/Tests/CudaOnly/WithDefs/main.notcu +++ b/Tests/CudaOnly/WithDefs/main.notcu @@ -2,12 +2,21 @@ #include #include +#ifndef PACKED_DEFINE +#error "PACKED_DEFINE not defined!" +#endif + static __global__ void DetermineIfValidCudaDevice() { } +#ifdef _MSC_VER +#pragma pack(push,1) +#undef PACKED_DEFINE +#define PACKED_DEFINE +#endif struct PACKED_DEFINE result_type { bool valid; @@ -16,6 +25,9 @@ struct PACKED_DEFINE result_type #error missing DEFREL flag #endif }; +#ifdef _MSC_VER +#pragma pack(pop) +#endif result_type can_launch_kernel() { diff --git a/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake new file mode 100644 index 0000000..ea22152 --- /dev/null +++ b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake @@ -0,0 +1,9 @@ +enable_language(CUDA) +try_compile(result ${CMAKE_CURRENT_BINARY_DIR} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.cu + CUDA_STANDARD 3 # bogus, but not used + OUTPUT_VARIABLE out + ) +if(NOT result) + message(FATAL_ERROR "try_compile failed:\n${out}") +endif() diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 5452e6d..6a1bc64 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -36,7 +36,11 @@ elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT) run_cmake(CxxStandardNoDefault) endif() if(CMake_TEST_CUDA) - run_cmake(CudaStandard) + if(CMAKE_HOST_WIN32) + run_cmake(CudaStandardNoDefault) + else() + run_cmake(CudaStandard) + endif() endif() if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) run_cmake(CStandardGNU) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:35:50 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:35:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1029-ge0cc40e Message-ID: <20170111153550.7552DFA862@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e0cc40ed58a16f63a26cf25c56f6e8471401fbfe (commit) via e9d3557ccc4b26503aa7d59ec2eaf179c9924a5b (commit) via c046356a5c37f52292f65dfff2afd72cde1c47af (commit) via 68d13665e023f6ccb51ba0375cabd27e492db483 (commit) via 195ab50f635bb95035b5bf2fda7a3bf692a122f5 (commit) from 12d5ccd10a451301bf3cbdefe8fde744bf6c9467 (commit) Those revisions listed 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 Jan 11 10:35:50 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:35:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2069-gc16ab96 Message-ID: <20170111153550.98754FA866@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via c16ab966d519e8d8cb7bb073cc9b3e8d507b5cca (commit) via e0cc40ed58a16f63a26cf25c56f6e8471401fbfe (commit) via e9d3557ccc4b26503aa7d59ec2eaf179c9924a5b (commit) via c046356a5c37f52292f65dfff2afd72cde1c47af (commit) via 68d13665e023f6ccb51ba0375cabd27e492db483 (commit) via 195ab50f635bb95035b5bf2fda7a3bf692a122f5 (commit) from 374e984b7e143008d38b7d148b1700cadbccbb59 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c16ab966d519e8d8cb7bb073cc9b3e8d507b5cca commit c16ab966d519e8d8cb7bb073cc9b3e8d507b5cca Merge: 374e984 e0cc40e Author: Brad King AuthorDate: Wed Jan 11 10:35:33 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 10:35:33 2017 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:35:50 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:35:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.1-17-ge9d3557 Message-ID: <20170111153550.AE01EFA867@public.kitware.com> This is an automated email from 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 e9d3557ccc4b26503aa7d59ec2eaf179c9924a5b (commit) via a9b93501d435bcd30a96e3091255e509fedbb39f (commit) via c046356a5c37f52292f65dfff2afd72cde1c47af (commit) via 5ffee691ee0c55d043238960cf1149cbcfb86047 (commit) via 68d13665e023f6ccb51ba0375cabd27e492db483 (commit) via 33e628ee809cd1d7ec2a8a0290ac0351fa4d499b (commit) via 195ab50f635bb95035b5bf2fda7a3bf692a122f5 (commit) via 7789dd9a1ae79d6747883739a21cf90c139d1e54 (commit) from 12bea47fa4d47b8e887ddbaf4c4fcc312d3052dc (commit) Those revisions listed 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/FindBoost.cmake | 17 ++++++++++++++++- Modules/FindPostgreSQL.cmake | 7 ++++++- Source/cmServerProtocol.cxx | 10 ++++++++-- 3 files changed, 30 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:50:37 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:50:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2071-g74a0318 Message-ID: <20170111155037.62BCBFA4EE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 74a03183ffc0982cd948bf76ce84f7891b585d1e (commit) via a7c5d5fb0e8d096dfc9b6e82e93f1e0d6225fe1f (commit) from c16ab966d519e8d8cb7bb073cc9b3e8d507b5cca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74a03183ffc0982cd948bf76ce84f7891b585d1e commit 74a03183ffc0982cd948bf76ce84f7891b585d1e Merge: c16ab96 a7c5d5f Author: Brad King AuthorDate: Wed Jan 11 10:50:36 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 10:50:36 2017 -0500 Merge topic 'get_prerequisites_delayload' into next a7c5d5fb GetPrerequisites: Exclude delay load dependencies on Windows https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7c5d5fb0e8d096dfc9b6e82e93f1e0d6225fe1f commit a7c5d5fb0e8d096dfc9b6e82e93f1e0d6225fe1f Author: Pascal Thomet AuthorDate: Thu Dec 22 12:28:26 2016 +0100 Commit: Brad King CommitDate: Wed Jan 11 10:48:36 2017 -0500 GetPrerequisites: Exclude delay load dependencies on Windows With some Windows toolchains we use `objdump` which does not mention delay load dependencies in its output. Therefore, to get consistent behavior we should always ignore them. Use the `dumpbin` message "Image has the following delay load dependencies" that precedes the delay load dependencies to recognize and skip them. Fortunately, this message is not translated to the current locale (at least on "Windows 7 French", "Windows 10 French" and "Windows Server 2008 R2 French"). Fixes: #16241 diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 72775ce..d0cd5b9 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -810,6 +810,20 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa OUTPUT_VARIABLE gp_cmd_ov ERROR_VARIABLE gp_ev ) + + if(gp_tool STREQUAL "dumpbin") + # Exclude delay load dependencies under windows (they are listed in dumpbin output after the message below) + string(FIND "${gp_cmd_ov}" "Image has the following delay load dependencies" gp_delayload_pos) + if (${gp_delayload_pos} GREATER -1) + string(SUBSTRING "${gp_cmd_ov}" 0 ${gp_delayload_pos} gp_cmd_ov_no_delayload_deps) + string(SUBSTRING "${gp_cmd_ov}" ${gp_delayload_pos} -1 gp_cmd_ov_delayload_deps) + if (verbose) + message(STATUS "GetPrequisites(${target}) : ignoring the following delay load dependencies :\n ${gp_cmd_ov_delayload_deps}") + endif() + set(gp_cmd_ov ${gp_cmd_ov_no_delayload_deps}) + endif() + endif() + if(NOT gp_rv STREQUAL "0") if(gp_tool STREQUAL "dumpbin") # dumpbin error messages seem to go to stdout ----------------------------------------------------------------------- Summary of changes: Modules/GetPrerequisites.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:53:37 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:53:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2073-g6a7f9c0 Message-ID: <20170111155337.4483AFA57B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6a7f9c025da31eff3cd63dd85c16dc5aad0534fe (commit) via d6877e6c405eb67f0e3e9eae783de02d1d8be659 (commit) from 74a03183ffc0982cd948bf76ce84f7891b585d1e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a7f9c025da31eff3cd63dd85c16dc5aad0534fe commit 6a7f9c025da31eff3cd63dd85c16dc5aad0534fe Merge: 74a0318 d6877e6 Author: Brad King AuthorDate: Wed Jan 11 10:53:36 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 10:53:36 2017 -0500 Merge topic 'dont-include-CMakeParseArguments' into next d6877e6c Don't include CMakeParseArguments https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6877e6c405eb67f0e3e9eae783de02d1d8be659 commit d6877e6c405eb67f0e3e9eae783de02d1d8be659 Author: Daniel Pfeifer AuthorDate: Tue Dec 20 16:14:16 2016 +0100 Commit: Daniel Pfeifer CommitDate: Wed Jan 11 13:14:57 2017 +0100 Don't include CMakeParseArguments The cmake_parse_arguments command is builtin with version 3.5. The CMakeParseArguments module is empty and exists for backwards compatibility with CMake 3.4 and lower. Remove the includes of CMakeParseArguments from CMake's modules. The modules are always used with the current version of CMake. Leave the includes in the tests, as the tests may be run with an older version of CMake. diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake index 3b39bce..4649f35 100644 --- a/Modules/CMakeAddFortranSubdirectory.cmake +++ b/Modules/CMakeAddFortranSubdirectory.cmake @@ -45,7 +45,6 @@ set(_MS_MINGW_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) include(CheckLanguage) include(ExternalProject) -include(CMakeParseArguments) function(_setup_mingw_config_and_build source_dir build_dir) # Look for a MinGW gfortran. diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index 484e1f0..7ca79bd 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -11,8 +11,6 @@ function(_readFile file) set(_compiler_id_pp_test_${CompilerId} ${_compiler_id_pp_test} PARENT_SCOPE) endfunction() -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - function(compiler_id_detection outvar lang) if (NOT lang STREQUAL Fortran AND NOT lang STREQUAL CSharp) diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake index add0c6d..ad065f0 100644 --- a/Modules/CMakeExpandImportedTargets.cmake +++ b/Modules/CMakeExpandImportedTargets.cmake @@ -37,9 +37,6 @@ # LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} # CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}" ) - -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT ) set(options ) diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 8415641..3210222 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -201,9 +201,6 @@ # # check_required_components(Foo) - -include(CMakeParseArguments) - include(WriteBasicConfigVersionFile) macro(WRITE_BASIC_PACKAGE_VERSION_FILE) diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake index bf98a42..21c333e 100644 --- a/Modules/CMakePrintHelpers.cmake +++ b/Modules/CMakePrintHelpers.cmake @@ -39,8 +39,6 @@ # # -- CMAKE_C_COMPILER="/usr/bin/gcc" ; CMAKE_MAJOR_VERSION="2" ; DOES_NOT_EXIST="" -include(CMakeParseArguments) - function(CMAKE_PRINT_VARIABLES) set(msg "") foreach(var ${ARGN}) diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index d0d24ba..b3ab055 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -630,10 +630,6 @@ if(NOT CPackComponent_CMake_INCLUDED) include(CPackComponent) endif() -if(NOT __CMAKE_PARSE_ARGUMENTS_INCLUDED) - include(CMakeParseArguments) -endif() - # Resolve full filename for script file macro(_cpack_ifw_resolve_script _variable) set(_ifw_script_macro ${_variable}) diff --git a/Modules/CTestCoverageCollectGCOV.cmake b/Modules/CTestCoverageCollectGCOV.cmake index 8451a6a..1203be4 100644 --- a/Modules/CTestCoverageCollectGCOV.cmake +++ b/Modules/CTestCoverageCollectGCOV.cmake @@ -65,7 +65,6 @@ # Suppress non-error messages that otherwise would have been # printed out by this function. -include(CMakeParseArguments) function(ctest_coverage_collect_gcov) set(options QUIET GLOB DELETE) set(oneValueArgs TARBALL SOURCE BUILD GCOV_COMMAND) diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 88bc1c8..78d9df3 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -26,9 +26,6 @@ Functions #]=======================================================================] -include("${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake") - - function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet) set(_type "ANY") diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake index 0ebd465..d684ccd 100644 --- a/Modules/FindBISON.cmake +++ b/Modules/FindBISON.cmake @@ -84,8 +84,6 @@ find_program(BISON_EXECUTABLE NAMES bison win_bison DOC "path to the bison executable") mark_as_advanced(BISON_EXECUTABLE) -include(CMakeParseArguments) - if(BISON_EXECUTABLE) # the bison commands should be executed with the C locale, otherwise # the message (which are parsed) may be translated diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake index 214873c..fef7fb4 100644 --- a/Modules/FindFLEX.cmake +++ b/Modules/FindFLEX.cmake @@ -107,8 +107,6 @@ find_path(FLEX_INCLUDE_DIR FlexLexer.h mark_as_advanced(FL_LIBRARY FLEX_INCLUDE_DIR) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - set(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR}) set(FLEX_LIBRARIES ${FL_LIBRARY}) diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index 1f447f1..e1b22b6 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -165,7 +165,6 @@ #============================================================= include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr) file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+") diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake index 7718468..8035507 100644 --- a/Modules/FindGettext.cmake +++ b/Modules/FindGettext.cmake @@ -77,8 +77,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE VERSION_VAR GETTEXT_VERSION_STRING) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - function(_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name) set(propertyName "_GETTEXT_UNIQUE_COUNTER_${_name}") get_property(currentCounter GLOBAL PROPERTY "${propertyName}") diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake index 7b46877..b77925d 100644 --- a/Modules/FindPackageHandleStandardArgs.cmake +++ b/Modules/FindPackageHandleStandardArgs.cmake @@ -130,7 +130,6 @@ message. #]=======================================================================] include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) # internal helper macro macro(_FPHSA_FAILURE_MESSAGE _msg) diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake index 6c8813c..09bdf1f 100644 --- a/Modules/FindSquish.cmake +++ b/Modules/FindSquish.cmake @@ -119,9 +119,6 @@ # # This is deprecated. Use SQUISH_V3_ADD_TEST() if you are using Squish 3.x instead. - -include(CMakeParseArguments) - set(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.") set(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.") set(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.") diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index c201714..6d1b4ed 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -184,7 +184,6 @@ # :prop_tgt:`CXX_VISIBILITY_PRESET <_VISIBILITY_PRESET>` and # :prop_tgt:`VISIBILITY_INLINES_HIDDEN` instead. -include(CMakeParseArguments) include(CheckCXXCompilerFlag) # TODO: Install this macro separately? diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index 6b34c8f..93255ae 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -403,8 +403,6 @@ # Sets the directory where the header files will be generated. Same behavior as option # '-d' of javah tool. If not specified, ${CMAKE_CURRENT_BINARY_DIR} is used as output directory. -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - function (__java_copy_file src dest comment) add_custom_command( OUTPUT ${dest} diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 651f9f1..e7512e7 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -231,8 +231,6 @@ endmacro() macro(SWIG_ADD_LIBRARY name) - - include(CMakeParseArguments) set(options "") set(oneValueArgs LANGUAGE TYPE) @@ -340,4 +338,3 @@ macro(SWIG_LINK_LIBRARIES name) message(SEND_ERROR "Cannot find Swig library \"${name}\".") endif() endmacro() - diff --git a/Modules/WriteBasicConfigVersionFile.cmake b/Modules/WriteBasicConfigVersionFile.cmake index 20c769e..7c9467a 100644 --- a/Modules/WriteBasicConfigVersionFile.cmake +++ b/Modules/WriteBasicConfigVersionFile.cmake @@ -18,8 +18,6 @@ # # Deprecated, see WRITE_BASIC_PACKAGE_VERSION_FILE(), it is identical. -include(CMakeParseArguments) - function(WRITE_BASIC_CONFIG_VERSION_FILE _filename) set(options ) diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index a390f4b..ba249e1 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -216,7 +216,6 @@ # CompatSupport_DEPRECATED= # ) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CMakeCompilerIdDetection.cmake) function(_load_compiler_variables CompilerId lang) ----------------------------------------------------------------------- Summary of changes: Modules/CMakeAddFortranSubdirectory.cmake | 1 - Modules/CMakeCompilerIdDetection.cmake | 2 -- Modules/CMakeExpandImportedTargets.cmake | 3 --- Modules/CMakePackageConfigHelpers.cmake | 3 --- Modules/CMakePrintHelpers.cmake | 2 -- Modules/CPackIFW.cmake | 4 ---- Modules/CTestCoverageCollectGCOV.cmake | 1 - Modules/FeatureSummary.cmake | 3 --- Modules/FindBISON.cmake | 2 -- Modules/FindFLEX.cmake | 2 -- Modules/FindGTK2.cmake | 1 - Modules/FindGettext.cmake | 2 -- Modules/FindPackageHandleStandardArgs.cmake | 1 - Modules/FindSquish.cmake | 3 --- Modules/GenerateExportHeader.cmake | 1 - Modules/UseJava.cmake | 2 -- Modules/UseSWIG.cmake | 3 --- Modules/WriteBasicConfigVersionFile.cmake | 2 -- Modules/WriteCompilerDetectionHeader.cmake | 1 - 19 files changed, 39 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 10:58:38 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 10:58:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2075-gafd1fd4 Message-ID: <20170111155838.D965BFA64B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via afd1fd49695b0dad9cca6f00749384568c214a9e (commit) via 17a0703d205d26048247e22174a1eda36498d341 (commit) from 6a7f9c025da31eff3cd63dd85c16dc5aad0534fe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afd1fd49695b0dad9cca6f00749384568c214a9e commit afd1fd49695b0dad9cca6f00749384568c214a9e Merge: 6a7f9c0 17a0703 Author: Brad King AuthorDate: Wed Jan 11 10:58:37 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 10:58:37 2017 -0500 Merge topic 'fix_get_prerequisites' into next 17a0703d GetPrerequisites: Do not fail on files we cannot find https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17a0703d205d26048247e22174a1eda36498d341 commit 17a0703d205d26048247e22174a1eda36498d341 Author: Martin Koegler AuthorDate: Tue Jan 10 23:28:47 2017 +0100 Commit: Brad King CommitDate: Wed Jan 11 10:57:04 2017 -0500 GetPrerequisites: Do not fail on files we cannot find Historically we have always warned and skipped missing files. Since commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks for execute_process() calls, 2015-07-29) we fail instead, but this was not an intentional part of that change. Restore the warn-only behavior so that missing system libraries (e.g. during cross-compiling) do not cause failure. Closes: #16523 diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 72775ce..d6a78de 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -654,6 +654,8 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa if(NOT EXISTS "${target}") message("warning: target '${target}' does not exist...") + set(${prerequisites_var} "" PARENT_SCOPE) + return() endif() set(gp_cmd_paths ${gp_cmd_paths} ----------------------------------------------------------------------- Summary of changes: Modules/GetPrerequisites.cmake | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 11:14:56 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 11:14:56 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2077-gee14e5a Message-ID: <20170111161456.231D8F9FE7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ee14e5aaa12451d93a0cc3787d2f73b2841ec950 (commit) via 1ce39a1e73d6a38ec53679113ba643ac6a51781c (commit) from afd1fd49695b0dad9cca6f00749384568c214a9e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee14e5aaa12451d93a0cc3787d2f73b2841ec950 commit ee14e5aaa12451d93a0cc3787d2f73b2841ec950 Merge: afd1fd4 1ce39a1 Author: Brad King AuthorDate: Wed Jan 11 11:14:55 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 11:14:55 2017 -0500 Merge topic 'cuda_compile_features_test_use_widely_supported_feature' into next 1ce39a1e CUDA: ConsumeCompileFeatures use cxx_nullptr for wider compiler support https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ce39a1e73d6a38ec53679113ba643ac6a51781c commit 1ce39a1e73d6a38ec53679113ba643ac6a51781c Author: Robert Maynard AuthorDate: Wed Jan 11 10:40:38 2017 -0500 Commit: Robert Maynard CommitDate: Wed Jan 11 10:40:38 2017 -0500 CUDA: ConsumeCompileFeatures use cxx_nullptr for wider compiler support We need to use a C++11 feature that is supported by the widest range of compilers, so we chose nullptr instead of constexpr. diff --git a/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt b/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt index 8361b9e..9fda2d0 100644 --- a/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt +++ b/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt @@ -11,7 +11,7 @@ project (CudaConsumeCompileFeatures CXX CUDA) add_library(CudaConsumeLib STATIC static.cpp static.cu) -target_compile_features(CudaConsumeLib PUBLIC cxx_constexpr) +target_compile_features(CudaConsumeLib PUBLIC cxx_nullptr) add_executable(CudaConsumeCompileFeatures main.cu) target_link_libraries(CudaConsumeCompileFeatures PRIVATE CudaConsumeLib) ----------------------------------------------------------------------- Summary of changes: Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 11:33:57 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 11:33:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2079-g5c6d51b Message-ID: <20170111163357.7FB63FA831@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5c6d51bdf072a8fb6e683636321e57430c0268ac (commit) via e0ed1de4fb5e9d18c2d00775229496079d6e077a (commit) from ee14e5aaa12451d93a0cc3787d2f73b2841ec950 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c6d51bdf072a8fb6e683636321e57430c0268ac commit 5c6d51bdf072a8fb6e683636321e57430c0268ac Merge: ee14e5a e0ed1de Author: Brad King AuthorDate: Wed Jan 11 11:33:56 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 11:33:56 2017 -0500 Merge topic 'InstallRequiredSystemLibraries-UCRT-configs' into next e0ed1de4 InstallRequiredSystemLibraries: Distinguish UCRT install configurations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0ed1de4fb5e9d18c2d00775229496079d6e077a commit e0ed1de4fb5e9d18c2d00775229496079d6e077a Author: Bjoern Thiel AuthorDate: Wed Jan 11 04:49:22 2017 -0500 Commit: Brad King CommitDate: Wed Jan 11 11:20:47 2017 -0500 InstallRequiredSystemLibraries: Distinguish UCRT install configurations Teach the `CMAKE_INSTALL_UCRT_LIBRARIES` feature to honor the `CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY` and `CMAKE_INSTALL_DEBUG_LIBRARIES` settings. Closes: #16542 diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index b0446c9..b04f044 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -204,21 +204,27 @@ if(MSVC) endif() if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT v VERSION_LESS 14) - # Find the Windows Universal CRT redistribution directory. + # Find the Windows Kits directory. get_filename_component(windows_kits_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE) set(programfilesx86 "ProgramFiles(x86)") - find_path(WINDOWS_KITS_REDIST_DIR NAMES ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll + find_path(WINDOWS_KITS_DIR NAMES Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll PATHS - "${windows_kits_dir}/Redist" - "$ENV{ProgramFiles}/Windows Kits/10/Redist" - "$ENV{${programfilesx86}}/Windows Kits/10/Redist" + "${windows_kits_dir}" + "$ENV{ProgramFiles}/Windows Kits/10" + "$ENV{${programfilesx86}}/Windows Kits/10" ) - mark_as_advanced(WINDOWS_KITS_REDIST_DIR) + mark_as_advanced(WINDOWS_KITS_DIR) # Glob the list of UCRT DLLs. - file(GLOB __ucrt_dlls "${WINDOWS_KITS_REDIST_DIR}/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") - list(APPEND __install__libs ${__ucrt_dlls}) + if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") + list(APPEND __install__libs ${__ucrt_dlls}) + endif() + if(CMAKE_INSTALL_DEBUG_LIBRARIES) + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll") + list(APPEND __install__libs ${__ucrt_dlls}) + endif() endif() endmacro() ----------------------------------------------------------------------- Summary of changes: Modules/InstallRequiredSystemLibraries.cmake | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 11:45:18 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 11:45:18 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2081-gef155cf Message-ID: <20170111164518.9887CF9E8F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ef155cf6403be058f878d046045e111a1bff41d8 (commit) via eb728d266e171987616c71a63f3f772eab45ebf3 (commit) from 5c6d51bdf072a8fb6e683636321e57430c0268ac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef155cf6403be058f878d046045e111a1bff41d8 commit ef155cf6403be058f878d046045e111a1bff41d8 Merge: 5c6d51b eb728d2 Author: Brad King AuthorDate: Wed Jan 11 11:45:17 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 11:45:17 2017 -0500 Merge topic 'FindJava-jre-hints' into next eb728d26 FindJava: add hints for jre https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb728d266e171987616c71a63f3f772eab45ebf3 commit eb728d266e171987616c71a63f3f772eab45ebf3 Author: Rechi Rechi AuthorDate: Wed Jan 11 16:31:01 2017 +0100 Commit: Rechi Rechi CommitDate: Wed Jan 11 16:31:01 2017 +0100 FindJava: add hints for jre diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 5c0abb0..4265a97 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -86,6 +86,14 @@ list(APPEND _JAVA_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\2.0;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.9;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.8;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.7;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\2.6;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.5;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.4;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.3;JavaHome]/bin" ) # Hard-coded guesses should still go in PATHS. This ensures that the user # environment can always override hard guesses. ----------------------------------------------------------------------- Summary of changes: Modules/FindJava.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 11:48:12 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 11:48:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2083-g6ec6ac2 Message-ID: <20170111164812.62846FA3B5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6ec6ac205967a40297e8d3b9c0ca9d27863ef8c5 (commit) via 3462118c6d700754e243492c3a65ef4ff26923f5 (commit) from ef155cf6403be058f878d046045e111a1bff41d8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ec6ac205967a40297e8d3b9c0ca9d27863ef8c5 commit 6ec6ac205967a40297e8d3b9c0ca9d27863ef8c5 Merge: ef155cf 3462118 Author: Brad King AuthorDate: Wed Jan 11 11:48:11 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 11:48:11 2017 -0500 Merge topic 'codeblocks-nmake-makefiles-jom' into next 3462118c Allow CodeBlocks for NMake Makefiles JOM https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3462118c6d700754e243492c3a65ef4ff26923f5 commit 3462118c6d700754e243492c3a65ef4ff26923f5 Author: Konstantin Podsvirov AuthorDate: Tue Jan 10 01:23:18 2017 +0300 Commit: Konstantin Podsvirov CommitDate: Tue Jan 10 19:26:21 2017 +0300 Allow CodeBlocks for NMake Makefiles JOM diff --git a/Help/generator/CodeBlocks.rst b/Help/generator/CodeBlocks.rst index 01798c7..d03cb0c 100644 --- a/Help/generator/CodeBlocks.rst +++ b/Help/generator/CodeBlocks.rst @@ -18,6 +18,9 @@ This "extra" generator may be specified as: ``CodeBlocks - NMake Makefiles`` Generate with :generator:`NMake Makefiles`. +``CodeBlocks - NMake Makefiles JOM`` + Generate with :generator:`NMake Makefiles JOM`. + ``CodeBlocks - Ninja`` Generate with :generator:`Ninja`. diff --git a/Help/release/dev/codeblocks-nmake-makefiles-jom.rst b/Help/release/dev/codeblocks-nmake-makefiles-jom.rst new file mode 100644 index 0000000..f5612f0 --- /dev/null +++ b/Help/release/dev/codeblocks-nmake-makefiles-jom.rst @@ -0,0 +1,5 @@ +codeblocks-nmake-makefiles-jom +------------------------------ + +* The :generator:`CodeBlocks` now can generate with + :generator:`NMake Makefiles JOM`. diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index f544e8a..2dffcaa 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -48,6 +48,7 @@ cmExtraCodeBlocksGenerator::GetFactory() #if defined(_WIN32) factory.AddSupportedGlobalGenerator("MinGW Makefiles"); factory.AddSupportedGlobalGenerator("NMake Makefiles"); + factory.AddSupportedGlobalGenerator("NMake Makefiles JOM"); // disable until somebody actually tests it: // this->AddSupportedGlobalGenerator("MSYS Makefiles"); #endif @@ -741,7 +742,7 @@ std::string cmExtraCodeBlocksGenerator::BuildMakeCommand( } std::string generator = this->GlobalGenerator->GetName(); - if (generator == "NMake Makefiles") { + if (generator == "NMake Makefiles" || generator == "NMake Makefiles JOM") { // For Windows ConvertToOutputPath already adds quotes when required. // These need to be escaped, see // https://gitlab.kitware.com/cmake/cmake/issues/13952 ----------------------------------------------------------------------- Summary of changes: Help/generator/CodeBlocks.rst | 3 +++ Help/release/dev/codeblocks-nmake-makefiles-jom.rst | 5 +++++ Source/cmExtraCodeBlocksGenerator.cxx | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/codeblocks-nmake-makefiles-jom.rst hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 11:54:44 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 11:54:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2085-ge80f026 Message-ID: <20170111165444.CC96EFA5AF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e80f026bd36fbfe70b0d88caa81bed429ca81b11 (commit) via 0315ab7a31091eda95caac319d42409c24fc6fac (commit) from 6ec6ac205967a40297e8d3b9c0ca9d27863ef8c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e80f026bd36fbfe70b0d88caa81bed429ca81b11 commit e80f026bd36fbfe70b0d88caa81bed429ca81b11 Merge: 6ec6ac2 0315ab7 Author: Brad King AuthorDate: Wed Jan 11 11:54:44 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 11:54:44 2017 -0500 Merge topic 'cmake-install-infix' into next 0315ab7a Add installation infix (empty by default) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0315ab7a31091eda95caac319d42409c24fc6fac commit 0315ab7a31091eda95caac319d42409c24fc6fac Author: Konstantin Podsvirov AuthorDate: Wed Jan 11 14:10:39 2017 +0300 Commit: Konstantin Podsvirov CommitDate: Wed Jan 11 14:10:39 2017 +0300 Add installation infix (empty by default) diff --git a/Source/CMakeInstallDestinations.cmake b/Source/CMakeInstallDestinations.cmake index 023f6c0..28f4e87 100644 --- a/Source/CMakeInstallDestinations.cmake +++ b/Source/CMakeInstallDestinations.cmake @@ -25,6 +25,12 @@ set(CMAKE_DOC_DIR_DESC "docs") set(CMAKE_MAN_DIR_DESC "man pages") set(CMAKE_XDGDATA_DIR_DESC "XDG specific files") +set(CMake_INSTALL_INFIX "" CACHE STRING "") +set_property(CACHE CMake_INSTALL_INFIX PROPERTY HELPSTRING + "Intermediate installation path (empty by default)" + ) +mark_as_advanced(CMake_INSTALL_INFIX) + foreach(v CMAKE_BIN_DIR CMAKE_DATA_DIR @@ -41,7 +47,7 @@ foreach(v # Use the default when the user did not set this variable. if(NOT ${v}) - set(${v} "${${v}_DEFAULT}") + set(${v} "${CMake_INSTALL_INFIX}${${v}_DEFAULT}") endif() # Remove leading slash to treat as relative to install prefix. string(REGEX REPLACE "^/" "" ${v} "${${v}}") ----------------------------------------------------------------------- Summary of changes: Source/CMakeInstallDestinations.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 13:26:00 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 13:26:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2087-gd3c7c80 Message-ID: <20170111182600.CB846FA67D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d3c7c8008643475c656562837bf3c072e57ef799 (commit) via 6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 (commit) from e80f026bd36fbfe70b0d88caa81bed429ca81b11 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3c7c8008643475c656562837bf3c072e57ef799 commit d3c7c8008643475c656562837bf3c072e57ef799 Merge: e80f026 6310f7c Author: Brad King AuthorDate: Wed Jan 11 13:25:59 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 13:25:59 2017 -0500 Merge topic 'add-cpack-ifw-configure-file' into next 6310f7c3 Add cpack_ifw_configure_file command https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 commit 6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 Author: Konstantin Podsvirov AuthorDate: Tue Dec 13 02:01:14 2016 +0300 Commit: Konstantin Podsvirov CommitDate: Wed Jan 11 13:56:45 2017 +0300 Add cpack_ifw_configure_file command diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 015e36e..d4712ba 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -59,6 +59,7 @@ All Modules /module/CPackDeb /module/CPackDMG /module/CPackIFW + /module/CPackIFWConfigureFile /module/CPackNSIS /module/CPackPackageMaker /module/CPackProductBuild diff --git a/Help/module/CPackIFWConfigureFile.rst b/Help/module/CPackIFWConfigureFile.rst new file mode 100644 index 0000000..e88517c --- /dev/null +++ b/Help/module/CPackIFWConfigureFile.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/CPackIFWConfigureFile.cmake diff --git a/Help/release/dev/cpack-ifw-configure-file.rst b/Help/release/dev/cpack-ifw-configure-file.rst new file mode 100644 index 0000000..c9a1220 --- /dev/null +++ b/Help/release/dev/cpack-ifw-configure-file.rst @@ -0,0 +1,9 @@ +cpack-ifw-configure-file +------------------------ + +* The :command:`cpack_ifw_configure_file` command was added + (in :module:`CPackIFWConfigureFile`) to configure file templates prepared + in QtIFW/SDK/Creator style. + +* The :module:`CPackIFWConfigureFile` module was added to define + :command:`cpack_ifw_configure_file` command. diff --git a/Modules/CPackIFWConfigureFile.cmake b/Modules/CPackIFWConfigureFile.cmake new file mode 100644 index 0000000..790574a --- /dev/null +++ b/Modules/CPackIFWConfigureFile.cmake @@ -0,0 +1,65 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#.rst: +# CPackIFWConfigureFile +# --------------------- +# +# The module defines :command:`configure_file` similar command to +# configure file templates prepared in QtIFW/SDK/Creator style. +# +# +# Commands +# ^^^^^^^^ +# +# The module defines the following commands: +# +# .. command:: cpack_ifw_configure_file +# +# Copy a file to another location and modify its contents. +# +# :: +# +# cpack_ifw_configure_file( ) +# +# Copies an ```` file to an ```` file and substitutes variable +# values referenced as ``%{VAR}`` or ``%VAR%`` in the input file content. +# Each variable reference will be replaced with the current value of the +# variable, or the empty string if the variable is not defined. +# + +# NOTE: This file used to himself packaging via CPack IFW generator and +# should be compatible with minimal CMake version defined in +# ../CMakeLists.txt file. + +if(NOT DEFINED CPackIFWConfigureFile_CMake_INCLUDED) +set(CPackIFWConfigureFile_CMake_INCLUDED 1) + +macro(cpack_ifw_configure_file INPUT OUTPUT) + file(READ "${INPUT}" _tmp) + foreach(_tmp_regex "%{([^%}]+)}" "%([^%]+)%") + string(REGEX MATCHALL "${_tmp_regex}" _tmp_vars "${_tmp}") + while(_tmp_vars) + foreach(_tmp_var ${_tmp_vars}) + string(REGEX REPLACE "${_tmp_regex}" "\\1" + _tmp_var_name "${_tmp_var}") + if(DEFINED ${_tmp_var_name}) + set(_tmp_var_value "${${_tmp_var_name}}") + elseif(NOT "$ENV{${_tmp_var_name}}" STREQUAL "") + set(_tmp_var_value "$ENV{${_tmp_var_name}}") + else() + set(_tmp_var_value "") + endif() + string(REPLACE "${_tmp_var}" "${_tmp_var_value}" _tmp "${_tmp}") + endforeach() + string(REGEX MATCHALL "${_tmp_regex}" _tmp_vars "${_tmp}") + endwhile() + endforeach() + if(IS_ABSOLUTE "${OUTPUT}") + file(WRITE "${OUTPUT}" "${_tmp}") + else() + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT}" "${_tmp}") + endif() +endmacro() + +endif() # NOT DEFINED CPackIFWConfigureFile_CMake_INCLUDED ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/CPackIFWConfigureFile.rst | 1 + Help/release/dev/cpack-ifw-configure-file.rst | 9 ++++ Modules/CPackIFWConfigureFile.cmake | 65 +++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 Help/module/CPackIFWConfigureFile.rst create mode 100644 Help/release/dev/cpack-ifw-configure-file.rst create mode 100644 Modules/CPackIFWConfigureFile.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 13:51:57 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 13:51:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2089-gaedbd25 Message-ID: <20170111185158.18923FA256@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via aedbd25e061fc348bd2b88862956d972a955059b (commit) via 7bad99b0d3fb50853937d99cd68eb340a0975156 (commit) from d3c7c8008643475c656562837bf3c072e57ef799 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aedbd25e061fc348bd2b88862956d972a955059b commit aedbd25e061fc348bd2b88862956d972a955059b Merge: d3c7c80 7bad99b Author: Brad King AuthorDate: Wed Jan 11 13:51:56 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 13:51:56 2017 -0500 Merge topic 'cmFileMonitor-skip-empty-names' into next 7bad99b0 cmake-server: Do not try watching subdirectories with empty names https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7bad99b0d3fb50853937d99cd68eb340a0975156 commit 7bad99b0d3fb50853937d99cd68eb340a0975156 Author: Aleix Pol AuthorDate: Wed Jan 11 19:08:04 2017 +0100 Commit: Brad King CommitDate: Wed Jan 11 13:48:41 2017 -0500 cmake-server: Do not try watching subdirectories with empty names `cmsys::SystemTools::SplitPath` will return empty segments on paths where there's duplicaded consequent slashes (e.g. `/home/dir/my//stuff`). This makes the cmFileWatcher choke. Teach cmFileMonitor to skip these empty segments. Closes: #16531 diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index ea37683..815de95 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -331,6 +331,9 @@ void cmFileMonitor::MonitorPaths(const std::vector& paths, rootSegment)); // Can not be both filename and root part of the path! const std::string& currentSegment = pathSegments[i]; + if (currentSegment.empty()) { + continue; + } cmIBaseWatcher* nextWatcher = currentWatcher->Find(currentSegment); if (!nextWatcher) { ----------------------------------------------------------------------- Summary of changes: Source/cmFileMonitor.cxx | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 14:59:00 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 14:59:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2091-ga37e6e2 Message-ID: <20170111195933.37197FA7D1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a37e6e27efa5729c6136105f6bd702986050d58c (commit) via 4b0c13a87ffb799334669f77978cc4d5e83f950a (commit) from aedbd25e061fc348bd2b88862956d972a955059b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a37e6e27efa5729c6136105f6bd702986050d58c commit a37e6e27efa5729c6136105f6bd702986050d58c Merge: aedbd25 4b0c13a Author: Brad King AuthorDate: Wed Jan 11 14:57:17 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 14:57:17 2017 -0500 Merge topic 'launcher-tests' into next 4b0c13a8 Tests: Add additional launcher tests https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b0c13a87ffb799334669f77978cc4d5e83f950a commit 4b0c13a87ffb799334669f77978cc4d5e83f950a Author: Matthew Woehlke AuthorDate: Tue Jan 10 13:48:59 2017 -0500 Commit: Matthew Woehlke CommitDate: Tue Jan 10 13:48:59 2017 -0500 Tests: Add additional launcher tests Modify the launcher test to also try to build two executables, having respectively build and link errors. This is intended to test that launchers are used when running compile and link commands, as well as custom commands. (In particular, this should catch breakage such as that fixed by ce71bd9505a.) diff --git a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt new file mode 100644 index 0000000..7376a40 --- /dev/null +++ b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) + +project(launcher_compiler_test_project) + +include(CTest) + +add_executable(build_error build_error.cxx) diff --git a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake similarity index 100% copy from Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake copy to Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake diff --git a/Tests/CTestTestLaunchers/launcher_compiler_test_project/build_error.cxx b/Tests/CTestTestLaunchers/launcher_compiler_test_project/build_error.cxx new file mode 100644 index 0000000..2d51693 --- /dev/null +++ b/Tests/CTestTestLaunchers/launcher_compiler_test_project/build_error.cxx @@ -0,0 +1,5 @@ +int main() +{ + int = 3; + return; +} diff --git a/Tests/CTestTestLaunchers/launcher_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt similarity index 89% rename from Tests/CTestTestLaunchers/launcher_test_project/CMakeLists.txt rename to Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt index 06c5725..b31f587 100644 --- a/Tests/CTestTestLaunchers/launcher_test_project/CMakeLists.txt +++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8.12) -project(launcher_test_project) +project(launcher_custom_command_test_project) include(CTest) diff --git a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake similarity index 100% copy from Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake copy to Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake diff --git a/Tests/CTestTestLaunchers/launcher_test_project/command.cmake b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/command.cmake similarity index 100% rename from Tests/CTestTestLaunchers/launcher_test_project/command.cmake rename to Tests/CTestTestLaunchers/launcher_custom_command_test_project/command.cmake diff --git a/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt b/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt new file mode 100644 index 0000000..38980aa --- /dev/null +++ b/Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) + +project(launcher_linker_test_project) + +include(CTest) + +add_executable(link_error link_error.cxx) diff --git a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake similarity index 100% rename from Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake rename to Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake diff --git a/Tests/CTestTestLaunchers/launcher_linker_test_project/link_error.cxx b/Tests/CTestTestLaunchers/launcher_linker_test_project/link_error.cxx new file mode 100644 index 0000000..c879be1 --- /dev/null +++ b/Tests/CTestTestLaunchers/launcher_linker_test_project/link_error.cxx @@ -0,0 +1,6 @@ +extern int foo(); + +int main() +{ + return foo(); +} diff --git a/Tests/CTestTestLaunchers/test.cmake.in b/Tests/CTestTestLaunchers/test.cmake.in index 03a118a..2db1ddd 100644 --- a/Tests/CTestTestLaunchers/test.cmake.in +++ b/Tests/CTestTestLaunchers/test.cmake.in @@ -1,39 +1,51 @@ cmake_minimum_required(VERSION 2.8.12) -# Settings: -set(CTEST_DASHBOARD_SOURCE "@CMake_SOURCE_DIR@/Tests/CTestTestLaunchers") -set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTestLaunchers") -set(CTEST_SITE "@SITE@") -set(CTEST_BUILD_NAME "Launchers- at BUILDNAME@-CTestTestLaunchers") - -set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_SOURCE}/launcher_test_project") -set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/launcher_test_project-bin") -set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") -set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") -set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") - -ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) - -file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " -CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ -CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ -CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ -CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@ -CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@ -CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@ -") - -set(TEST_SUCCESS FALSE) - -ctest_start(Experimental) -ctest_configure(OPTIONS "-DCTEST_USE_LAUNCHERS=1") -ctest_build(NUMBER_ERRORS error_count) - -if("${error_count}" STREQUAL "1") - set(TEST_SUCCESS TRUE) -endif() +set(TEST_SUCCESS TRUE) + +function(run_test_case NAME WHAT) + set(_message "Testing that launchers are used when running ${WHAT}") + message(STATUS "${_message}...") + + # Settings: + set(CTEST_DASHBOARD_SOURCE "@CMake_SOURCE_DIR@/Tests/CTestTestLaunchers") + set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTestLaunchers") + set(CTEST_SITE "@SITE@") + set(CTEST_BUILD_NAME "Launchers- at BUILDNAME@-CTestTestLaunchers") + + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_SOURCE}/${NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${NAME}-bin") + set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") + set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") + set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") + set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") + set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") + + ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + + file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " + CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ + CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ + CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ + CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@ + CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@ + CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@ + ") + + ctest_start(Experimental) + ctest_configure(OPTIONS "-DCTEST_USE_LAUNCHERS=1") + ctest_build(NUMBER_ERRORS error_count) + + if("${error_count}" STREQUAL "0") + set(TEST_SUCCESS FALSE PARENT_SCOPE) + message(STATUS "${_message}... FAIL") + else() + message(STATUS "${_message}... PASS") + endif() +endfunction() + +run_test_case(launcher_compiler_test_project "the compiler") +run_test_case(launcher_linker_test_project "the linker") +run_test_case(launcher_custom_command_test_project "a custom command") if(TEST_SUCCESS) message("CTEST_TEST_LAUNCHER_SUCCESS") ----------------------------------------------------------------------- Summary of changes: .../launcher_compiler_test_project/CMakeLists.txt | 7 ++ .../CTestConfig.cmake | 0 .../launcher_compiler_test_project/build_error.cxx | 5 ++ .../CMakeLists.txt | 2 +- .../CTestConfig.cmake | 0 .../command.cmake | 0 .../launcher_linker_test_project/CMakeLists.txt | 7 ++ .../CTestConfig.cmake | 0 .../launcher_linker_test_project/link_error.cxx} | 1 + Tests/CTestTestLaunchers/test.cmake.in | 80 +++++++++++--------- 10 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt copy Tests/CTestTestLaunchers/{launcher_test_project => launcher_compiler_test_project}/CTestConfig.cmake (100%) create mode 100644 Tests/CTestTestLaunchers/launcher_compiler_test_project/build_error.cxx rename Tests/CTestTestLaunchers/{launcher_test_project => launcher_custom_command_test_project}/CMakeLists.txt (89%) copy Tests/CTestTestLaunchers/{launcher_test_project => launcher_custom_command_test_project}/CTestConfig.cmake (100%) rename Tests/CTestTestLaunchers/{launcher_test_project => launcher_custom_command_test_project}/command.cmake (100%) create mode 100644 Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt rename Tests/CTestTestLaunchers/{launcher_test_project => launcher_linker_test_project}/CTestConfig.cmake (100%) copy Tests/{Dependency/Case4/bar.c => CTestTestLaunchers/launcher_linker_test_project/link_error.cxx} (98%) hooks/post-receive -- CMake From brad.king at kitware.com Wed Jan 11 15:06:27 2017 From: brad.king at kitware.com (Brad King) Date: Wed, 11 Jan 2017 15:06:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2093-g3dd0616 Message-ID: <20170111200801.D5201FA84E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3dd0616af3c5928e5c880186d5cfd241506a4369 (commit) via efff7086c66d63c62d9474eca5a3b2d21d725bfe (commit) from a37e6e27efa5729c6136105f6bd702986050d58c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dd0616af3c5928e5c880186d5cfd241506a4369 commit 3dd0616af3c5928e5c880186d5cfd241506a4369 Merge: a37e6e2 efff708 Author: Brad King AuthorDate: Wed Jan 11 15:06:11 2017 -0500 Commit: CMake Topic Stage CommitDate: Wed Jan 11 15:06:11 2017 -0500 Merge topic 'asan_overriding_user_options' into next efff7086 ctest_memcheck: Append sanitizers user options at the end to allow overriding https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efff7086c66d63c62d9474eca5a3b2d21d725bfe commit efff7086c66d63c62d9474eca5a3b2d21d725bfe Author: Sylvain Joubert AuthorDate: Wed Jan 11 18:58:19 2017 +0100 Commit: Sylvain Joubert CommitDate: Wed Jan 11 19:27:45 2017 +0100 ctest_memcheck: Append sanitizers user options at the end to allow overriding diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 4d23e45..a062e64 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -634,7 +634,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() std::string outputFile = envVar + "=log_path=\"" + this->MemoryTesterOutputFile + "\""; this->MemoryTesterEnvironmentVariable = - outputFile + extraOptions + suppressionsOption; + outputFile + suppressionsOption + extraOptions; break; } default: ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jan 12 00:01:16 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 12 Jan 2017 00:01:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1030-g053adc6 Message-ID: <20170112050117.7BF4EFA4AF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 053adc60ee80e55f2a8c09fadadc5db6e789412d (commit) from e0cc40ed58a16f63a26cf25c56f6e8471401fbfe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=053adc60ee80e55f2a8c09fadadc5db6e789412d commit 053adc60ee80e55f2a8c09fadadc5db6e789412d Author: Kitware Robot AuthorDate: Thu Jan 12 00:01:06 2017 -0500 Commit: Kitware Robot CommitDate: Thu Jan 12 00:01:06 2017 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a5a07dc..fde01c1 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 20170111) +set(CMake_VERSION_PATCH 20170112) #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 Jan 12 10:20:26 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1032-gc9a0b14 Message-ID: <20170112152026.46A11FA0EF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c9a0b14153b87de34a651b1136971f9404fc362c (commit) via 7bad99b0d3fb50853937d99cd68eb340a0975156 (commit) from 053adc60ee80e55f2a8c09fadadc5db6e789412d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9a0b14153b87de34a651b1136971f9404fc362c commit c9a0b14153b87de34a651b1136971f9404fc362c Merge: 053adc6 7bad99b Author: Brad King AuthorDate: Thu Jan 12 10:20:21 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:21 2017 -0500 Merge topic 'cmFileMonitor-skip-empty-names' 7bad99b0 cmake-server: Do not try watching subdirectories with empty names ----------------------------------------------------------------------- Summary of changes: Source/cmFileMonitor.cxx | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:20:32 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:32 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1034-g082456e Message-ID: <20170112152032.7EFE6FA1A1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 082456e5a3ded411c6cbbdf9c3d3f6fb39fbc9c5 (commit) via 3462118c6d700754e243492c3a65ef4ff26923f5 (commit) from c9a0b14153b87de34a651b1136971f9404fc362c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=082456e5a3ded411c6cbbdf9c3d3f6fb39fbc9c5 commit 082456e5a3ded411c6cbbdf9c3d3f6fb39fbc9c5 Merge: c9a0b14 3462118 Author: Brad King AuthorDate: Thu Jan 12 10:20:27 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:27 2017 -0500 Merge topic 'codeblocks-nmake-makefiles-jom' 3462118c Allow CodeBlocks for NMake Makefiles JOM ----------------------------------------------------------------------- Summary of changes: Help/generator/CodeBlocks.rst | 3 +++ Help/release/dev/codeblocks-nmake-makefiles-jom.rst | 5 +++++ Source/cmExtraCodeBlocksGenerator.cxx | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Help/release/dev/codeblocks-nmake-makefiles-jom.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:20:36 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1036-g592c8cf Message-ID: <20170112152037.8008CFA0EF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 592c8cfd93b8fd2ceb579b09b9b6f4c157adea3b (commit) via 6310f7c3a06cf56ddfda7fd5d2a36decb6802e57 (commit) from 082456e5a3ded411c6cbbdf9c3d3f6fb39fbc9c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=592c8cfd93b8fd2ceb579b09b9b6f4c157adea3b commit 592c8cfd93b8fd2ceb579b09b9b6f4c157adea3b Merge: 082456e 6310f7c Author: Brad King AuthorDate: Thu Jan 12 10:20:33 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:33 2017 -0500 Merge topic 'add-cpack-ifw-configure-file' 6310f7c3 Add cpack_ifw_configure_file command ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-modules.7.rst | 1 + Help/module/CPackIFWConfigureFile.rst | 1 + Help/release/dev/cpack-ifw-configure-file.rst | 9 ++++ Modules/CPackIFWConfigureFile.cmake | 65 +++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 Help/module/CPackIFWConfigureFile.rst create mode 100644 Help/release/dev/cpack-ifw-configure-file.rst create mode 100644 Modules/CPackIFWConfigureFile.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:20:40 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1038-gec09e91 Message-ID: <20170112152040.C3DAEFA1A1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39 (commit) via 0315ab7a31091eda95caac319d42409c24fc6fac (commit) from 592c8cfd93b8fd2ceb579b09b9b6f4c157adea3b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39 commit ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39 Merge: 592c8cf 0315ab7 Author: Brad King AuthorDate: Thu Jan 12 10:20:38 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:38 2017 -0500 Merge topic 'cmake-install-infix' 0315ab7a Add installation infix (empty by default) ----------------------------------------------------------------------- Summary of changes: Source/CMakeInstallDestinations.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:20:44 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1040-g097b47b Message-ID: <20170112152044.5A8FCFA21B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 097b47b972d04c0546f5799dc901f971b471c2b3 (commit) via d6877e6c405eb67f0e3e9eae783de02d1d8be659 (commit) from ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=097b47b972d04c0546f5799dc901f971b471c2b3 commit 097b47b972d04c0546f5799dc901f971b471c2b3 Merge: ec09e91 d6877e6 Author: Brad King AuthorDate: Thu Jan 12 10:20:41 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:41 2017 -0500 Merge topic 'dont-include-CMakeParseArguments' d6877e6c Don't include CMakeParseArguments ----------------------------------------------------------------------- Summary of changes: Modules/CMakeAddFortranSubdirectory.cmake | 1 - Modules/CMakeCompilerIdDetection.cmake | 2 -- Modules/CMakeExpandImportedTargets.cmake | 3 --- Modules/CMakePackageConfigHelpers.cmake | 3 --- Modules/CMakePrintHelpers.cmake | 2 -- Modules/CPackIFW.cmake | 4 ---- Modules/CTestCoverageCollectGCOV.cmake | 1 - Modules/FeatureSummary.cmake | 3 --- Modules/FindBISON.cmake | 2 -- Modules/FindFLEX.cmake | 2 -- Modules/FindGTK2.cmake | 1 - Modules/FindGettext.cmake | 2 -- Modules/FindPackageHandleStandardArgs.cmake | 1 - Modules/FindSquish.cmake | 3 --- Modules/GenerateExportHeader.cmake | 1 - Modules/UseJava.cmake | 2 -- Modules/UseSWIG.cmake | 3 --- Modules/WriteBasicConfigVersionFile.cmake | 2 -- Modules/WriteCompilerDetectionHeader.cmake | 1 - 19 files changed, 39 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:20:47 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1042-ge15106b Message-ID: <20170112152047.71554F9414@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e15106b2f1825fb42bb82a47b1ee5e9299212fa6 (commit) via 6e6253ea88542e9a3c8afc9560f131bc7073ead7 (commit) from 097b47b972d04c0546f5799dc901f971b471c2b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e15106b2f1825fb42bb82a47b1ee5e9299212fa6 commit e15106b2f1825fb42bb82a47b1ee5e9299212fa6 Merge: 097b47b 6e6253e Author: Brad King AuthorDate: Thu Jan 12 10:20:45 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:45 2017 -0500 Merge topic 'cmListFileLexer-warning-fix' 6e6253ea cmListFileLexer: Fix signature of cmListFileLexer_New ----------------------------------------------------------------------- Summary of changes: Source/cmListFileLexer.c | 2 +- Source/cmListFileLexer.h | 2 +- Source/cmListFileLexer.in.l | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:20:53 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:20:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1050-g88a816c Message-ID: <20170112152106.31C26FA252@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 88a816c6b9b4f5cb11b40410935d47fa61b39858 (commit) via 3a97a3713a498c9a89a1733131196f7fcd03552c (commit) via c93e85d87e683e4c20e5f29726889279aea9d921 (commit) via 18c8278b622e4cb9b155c5dc4ceac93322bed85f (commit) via d47bda00b2e46b3fd6f9e050f3f21b5337ac244b (commit) via efdfc26e14b5a4d8b52a1021ffe85418cdfc802f (commit) via ad5b702c0914e0912693b9e5a84d9fe4bb53d720 (commit) via def7395f6278c096ab8f4f418cd5db5059c8c314 (commit) from e15106b2f1825fb42bb82a47b1ee5e9299212fa6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88a816c6b9b4f5cb11b40410935d47fa61b39858 commit 88a816c6b9b4f5cb11b40410935d47fa61b39858 Merge: e15106b 3a97a37 Author: Brad King AuthorDate: Thu Jan 12 10:20:48 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:20:48 2017 -0500 Merge topic 'vs15-detect-from-installer' 3a97a371 VS: Port Visual Studio Setup third-party header to older VS versions c93e85d8 VS: Use Visual Studio Installer to locate VS 2017 18c8278b VS: Add helper class to interact with Visual Studio Installer d47bda00 VS: Fix VS 2017 Windows Store toolset selection efdfc26e VS: Drop check for VS 15 Express Edition ad5b702c VS: Port Visual Studio Setup third-party header to MinGW def7395f VS: Add Visual Studio Setup third-party header ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 2 + Source/cmGlobalVisualStudio10Generator.cxx | 14 - Source/cmGlobalVisualStudio15Generator.cxx | 56 +- Source/cmGlobalVisualStudio15Generator.h | 5 + Source/cmVSSetupHelper.cxx | 395 ++++++++++ Source/cmVSSetupHelper.h | 154 ++++ Source/cmake.cxx | 30 +- Utilities/{cmcurl => cmvssetup}/.gitattributes | 0 Utilities/cmvssetup/Setup.Configuration.h | 991 ++++++++++++++++++++++++ 9 files changed, 1603 insertions(+), 44 deletions(-) create mode 100644 Source/cmVSSetupHelper.cxx create mode 100644 Source/cmVSSetupHelper.h copy Utilities/{cmcurl => cmvssetup}/.gitattributes (100%) create mode 100644 Utilities/cmvssetup/Setup.Configuration.h hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:21:09 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:21:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1052-g2e550e3 Message-ID: <20170112152113.E9C4AFA25A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2e550e36d29332adda29f85fbf79e1610286ab9b (commit) via eb728d266e171987616c71a63f3f772eab45ebf3 (commit) from 88a816c6b9b4f5cb11b40410935d47fa61b39858 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e550e36d29332adda29f85fbf79e1610286ab9b commit 2e550e36d29332adda29f85fbf79e1610286ab9b Merge: 88a816c eb728d2 Author: Brad King AuthorDate: Thu Jan 12 10:21:07 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:21:07 2017 -0500 Merge topic 'FindJava-jre-hints' eb728d26 FindJava: add hints for jre ----------------------------------------------------------------------- Summary of changes: Modules/FindJava.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:21:17 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:21:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1054-g5e76ded Message-ID: <20170112152121.4B68AF9414@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5e76ded22c8900a8aea3dbc76f2401f5d832298e (commit) via 1ce39a1e73d6a38ec53679113ba643ac6a51781c (commit) from 2e550e36d29332adda29f85fbf79e1610286ab9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e76ded22c8900a8aea3dbc76f2401f5d832298e commit 5e76ded22c8900a8aea3dbc76f2401f5d832298e Merge: 2e550e3 1ce39a1 Author: Brad King AuthorDate: Thu Jan 12 10:21:15 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:21:15 2017 -0500 Merge topic 'cuda_compile_features_test_use_widely_supported_feature' 1ce39a1e CUDA: ConsumeCompileFeatures use cxx_nullptr for wider compiler support ----------------------------------------------------------------------- Summary of changes: Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:21:27 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:21:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1056-gb4f7ce5 Message-ID: <20170112152129.1FAE7FA25C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b4f7ce5c79bf06292deaad8097da7889eddc2886 (commit) via 17a0703d205d26048247e22174a1eda36498d341 (commit) from 5e76ded22c8900a8aea3dbc76f2401f5d832298e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4f7ce5c79bf06292deaad8097da7889eddc2886 commit b4f7ce5c79bf06292deaad8097da7889eddc2886 Merge: 5e76ded 17a0703 Author: Brad King AuthorDate: Thu Jan 12 10:21:24 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:21:24 2017 -0500 Merge topic 'fix_get_prerequisites' 17a0703d GetPrerequisites: Do not fail on files we cannot find ----------------------------------------------------------------------- Summary of changes: Modules/GetPrerequisites.cmake | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:21:33 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:21:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1058-gbc09abd Message-ID: <20170112152146.6CA48FA25A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via bc09abd7d07064ed046cdc8e959b443d69f77596 (commit) via a7c5d5fb0e8d096dfc9b6e82e93f1e0d6225fe1f (commit) from b4f7ce5c79bf06292deaad8097da7889eddc2886 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc09abd7d07064ed046cdc8e959b443d69f77596 commit bc09abd7d07064ed046cdc8e959b443d69f77596 Merge: b4f7ce5 a7c5d5f Author: Brad King AuthorDate: Thu Jan 12 10:21:30 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:21:30 2017 -0500 Merge topic 'get_prerequisites_delayload' a7c5d5fb GetPrerequisites: Exclude delay load dependencies on Windows ----------------------------------------------------------------------- Summary of changes: Modules/GetPrerequisites.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:22:00 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:22:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1060-ge31986b Message-ID: <20170112152202.E7127FA25A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e31986b90058a46071f7fe4a52788de6b42cb96c (commit) via e0ed1de4fb5e9d18c2d00775229496079d6e077a (commit) from bc09abd7d07064ed046cdc8e959b443d69f77596 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e31986b90058a46071f7fe4a52788de6b42cb96c commit e31986b90058a46071f7fe4a52788de6b42cb96c Merge: bc09abd e0ed1de Author: Brad King AuthorDate: Thu Jan 12 10:21:56 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:21:56 2017 -0500 Merge topic 'InstallRequiredSystemLibraries-UCRT-configs' e0ed1de4 InstallRequiredSystemLibraries: Distinguish UCRT install configurations ----------------------------------------------------------------------- Summary of changes: Modules/InstallRequiredSystemLibraries.cmake | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:22:06 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:22:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1062-g51255a7 Message-ID: <20170112152206.BA30DFA29F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 51255a7c7ade4b591b38ef6d61ce0f6a6ed96699 (commit) via efff7086c66d63c62d9474eca5a3b2d21d725bfe (commit) from e31986b90058a46071f7fe4a52788de6b42cb96c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51255a7c7ade4b591b38ef6d61ce0f6a6ed96699 commit 51255a7c7ade4b591b38ef6d61ce0f6a6ed96699 Merge: e31986b efff708 Author: Brad King AuthorDate: Thu Jan 12 10:22:04 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:22:04 2017 -0500 Merge topic 'asan_overriding_user_options' efff7086 ctest_memcheck: Append sanitizers user options at the end to allow overriding ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMemCheckHandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:22:11 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:22:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1064-g889fe63 Message-ID: <20170112152214.8779EFA2A7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 889fe63b510b9669e42af31600c2c887abe0bb34 (commit) via 4b0c13a87ffb799334669f77978cc4d5e83f950a (commit) from 51255a7c7ade4b591b38ef6d61ce0f6a6ed96699 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=889fe63b510b9669e42af31600c2c887abe0bb34 commit 889fe63b510b9669e42af31600c2c887abe0bb34 Merge: 51255a7 4b0c13a Author: Brad King AuthorDate: Thu Jan 12 10:22:08 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:22:08 2017 -0500 Merge topic 'launcher-tests' 4b0c13a8 Tests: Add additional launcher tests ----------------------------------------------------------------------- Summary of changes: .../launcher_compiler_test_project/CMakeLists.txt | 7 ++ .../CTestConfig.cmake | 0 .../launcher_compiler_test_project/build_error.cxx | 5 ++ .../CMakeLists.txt | 2 +- .../CTestConfig.cmake | 0 .../command.cmake | 0 .../launcher_linker_test_project/CMakeLists.txt | 7 ++ .../CTestConfig.cmake | 0 .../launcher_linker_test_project/link_error.cxx} | 1 + Tests/CTestTestLaunchers/test.cmake.in | 80 +++++++++++--------- 10 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 Tests/CTestTestLaunchers/launcher_compiler_test_project/CMakeLists.txt copy Tests/CTestTestLaunchers/{launcher_test_project => launcher_compiler_test_project}/CTestConfig.cmake (100%) create mode 100644 Tests/CTestTestLaunchers/launcher_compiler_test_project/build_error.cxx rename Tests/CTestTestLaunchers/{launcher_test_project => launcher_custom_command_test_project}/CMakeLists.txt (89%) copy Tests/CTestTestLaunchers/{launcher_test_project => launcher_custom_command_test_project}/CTestConfig.cmake (100%) rename Tests/CTestTestLaunchers/{launcher_test_project => launcher_custom_command_test_project}/command.cmake (100%) create mode 100644 Tests/CTestTestLaunchers/launcher_linker_test_project/CMakeLists.txt rename Tests/CTestTestLaunchers/{launcher_test_project => launcher_linker_test_project}/CTestConfig.cmake (100%) copy Tests/{Dependency/Case4/bar.c => CTestTestLaunchers/launcher_linker_test_project/link_error.cxx} (98%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:24:11 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:24:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2109-g6800c29 Message-ID: <20170112152412.80EF4FA2EF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 6800c29b1417421710719a176860e3ae6be99bb9 (commit) via 889fe63b510b9669e42af31600c2c887abe0bb34 (commit) via 51255a7c7ade4b591b38ef6d61ce0f6a6ed96699 (commit) via e31986b90058a46071f7fe4a52788de6b42cb96c (commit) via bc09abd7d07064ed046cdc8e959b443d69f77596 (commit) via b4f7ce5c79bf06292deaad8097da7889eddc2886 (commit) via 5e76ded22c8900a8aea3dbc76f2401f5d832298e (commit) via 2e550e36d29332adda29f85fbf79e1610286ab9b (commit) via 88a816c6b9b4f5cb11b40410935d47fa61b39858 (commit) via e15106b2f1825fb42bb82a47b1ee5e9299212fa6 (commit) via 097b47b972d04c0546f5799dc901f971b471c2b3 (commit) via ec09e91a653fb5d2df2d4fe5c3bc76a453ac5e39 (commit) via 592c8cfd93b8fd2ceb579b09b9b6f4c157adea3b (commit) via 082456e5a3ded411c6cbbdf9c3d3f6fb39fbc9c5 (commit) via c9a0b14153b87de34a651b1136971f9404fc362c (commit) via 053adc60ee80e55f2a8c09fadadc5db6e789412d (commit) from 3dd0616af3c5928e5c880186d5cfd241506a4369 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6800c29b1417421710719a176860e3ae6be99bb9 commit 6800c29b1417421710719a176860e3ae6be99bb9 Merge: 3dd0616 889fe63 Author: Brad King AuthorDate: Thu Jan 12 10:24:00 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:24:00 2017 -0500 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 Jan 12 10:25:38 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:25:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1066-g9f3eff6 Message-ID: <20170112152538.85233FA2FD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9f3eff6f5675851c81f093d16310d17e3754cd5f (commit) via 0051989738db8efe7fa3771e4526542810319e26 (commit) from 889fe63b510b9669e42af31600c2c887abe0bb34 (commit) Those revisions listed 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 Jan 12 10:25:38 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:25:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2112-g1730f19 Message-ID: <20170112152538.E5EB2FA2FC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1730f191089a5f5399635abd2fb6397809468e64 (commit) via 9f3eff6f5675851c81f093d16310d17e3754cd5f (commit) via 0051989738db8efe7fa3771e4526542810319e26 (commit) from 6800c29b1417421710719a176860e3ae6be99bb9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1730f191089a5f5399635abd2fb6397809468e64 commit 1730f191089a5f5399635abd2fb6397809468e64 Merge: 6800c29 9f3eff6 Author: Brad King AuthorDate: Thu Jan 12 10:25:24 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:25:24 2017 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:25:39 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:25:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.7.1-19-g0051989 Message-ID: <20170112152539.BD5E5FA327@public.kitware.com> This is an automated email from 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 0051989738db8efe7fa3771e4526542810319e26 (commit) via 7bad99b0d3fb50853937d99cd68eb340a0975156 (commit) from e9d3557ccc4b26503aa7d59ec2eaf179c9924a5b (commit) Those revisions listed 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/cmFileMonitor.cxx | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:39:37 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:39:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2124-g5a1cd30 Message-ID: <20170112153937.A0727F951E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5a1cd30ba35674baad81b42970528fb6e2c83f14 (commit) via f9a810f7b39406e00998c6e74e5a7d7d218d5aba (commit) via 5599d858c7881b4331c449ba5c59d255ed50bd11 (commit) via 1155170230ebd096df06ebf108908d6c99242d6d (commit) via 5365421e84e6133f0e038995e3a8232ec46d6a91 (commit) via 522b913f437b04aa10b84cb5807ab43181377d7e (commit) via 02582b91ad92969d8fbbd845a5d48b3fbd762966 (commit) via d470cb70077acf2216afe097b5abe379f1828239 (commit) via a2e80cb0853b3b8306069b833ec8c2128a77b072 (commit) via 65c1e012ffc17ab77e5aaa84b22241a81de4c2ce (commit) via 945dd207b6ca6ca38e3b87247836eb1b3d5f8a77 (commit) via 95420cea5e12d21957a50dae20f90c2e83571758 (commit) from 1730f191089a5f5399635abd2fb6397809468e64 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a1cd30ba35674baad81b42970528fb6e2c83f14 commit 5a1cd30ba35674baad81b42970528fb6e2c83f14 Merge: 1730f19 f9a810f Author: Brad King AuthorDate: Thu Jan 12 10:39:36 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:39:36 2017 -0500 Merge topic 'cuda-windows' into next f9a810f7 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls 5599d858 CUDA: Port test cases to Windows with MSVC host compiler 11551702 CUDA: Populate NVIDIA compiler information on Windows 5365421e CUDA: Detect implicit link information on Windows 522b913f CUDA: Find MSVC binutils on Windows 02582b91 CUDA: Populate compiler PDB placeholder during device linking d470cb70 CUDA: Use `.obj` object file extension on Windows a2e80cb0 CUDA: Detect MSVC architecture id 65c1e012 CUDA: Detect use of MSVC host compiler 945dd207 CUDA: Allow platform files to set device linking rules 95420cea CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9a810f7b39406e00998c6e74e5a7d7d218d5aba commit f9a810f7b39406e00998c6e74e5a7d7d218d5aba Author: Brad King AuthorDate: Thu Dec 15 15:17:08 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:04 2017 -0500 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls Uncomment the calls in `main.cpp` (and fix the signatures). diff --git a/Tests/CudaOnly/SeparateCompilation/main.cu b/Tests/CudaOnly/SeparateCompilation/main.cu index d4520ae..5c8e150 100644 --- a/Tests/CudaOnly/SeparateCompilation/main.cu +++ b/Tests/CudaOnly/SeparateCompilation/main.cu @@ -4,12 +4,12 @@ #include "file1.h" #include "file2.h" -// result_type file4_launch_kernel(int x); -// result_type file5_launch_kernel(int x); +int file4_launch_kernel(int x); +int file5_launch_kernel(int x); int main(int argc, char **argv) { - // file4_launch_kernel(42); - // file5_launch_kernel(42); + file4_launch_kernel(42); + file5_launch_kernel(42); return 0; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5599d858c7881b4331c449ba5c59d255ed50bd11 commit 5599d858c7881b4331c449ba5c59d255ed50bd11 Author: Brad King AuthorDate: Wed Dec 7 11:45:44 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:04 2017 -0500 CUDA: Port test cases to Windows with MSVC host compiler diff --git a/Tests/Cuda/Complex/dynamic.cpp b/Tests/Cuda/Complex/dynamic.cpp index d579f1e..3848ce7 100644 --- a/Tests/Cuda/Complex/dynamic.cpp +++ b/Tests/Cuda/Complex/dynamic.cpp @@ -1,5 +1,11 @@ -int dynamic_base_func(int x) +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + +EXPORT int dynamic_base_func(int x) { return x * x; } diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu index ea52acb..a23dc25 100644 --- a/Tests/Cuda/Complex/dynamic.cu +++ b/Tests/Cuda/Complex/dynamic.cu @@ -3,9 +3,15 @@ #include #include +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + int dynamic_base_func(int); -int __host__ cuda_dynamic_host_func(int x) +EXPORT int __host__ cuda_dynamic_host_func(int x) { return dynamic_base_func(x); } @@ -16,7 +22,7 @@ void DetermineIfValidCudaDevice() { } -void cuda_dynamic_lib_func() +EXPORT void cuda_dynamic_lib_func() { DetermineIfValidCudaDevice <<<1,1>>> (); cudaError_t err = cudaGetLastError(); diff --git a/Tests/Cuda/Complex/main.cpp b/Tests/Cuda/Complex/main.cpp index 32312d0..5a3f820 100644 --- a/Tests/Cuda/Complex/main.cpp +++ b/Tests/Cuda/Complex/main.cpp @@ -3,8 +3,14 @@ #include "file1.h" #include "file2.h" -int call_cuda_seperable_code(int x); -int mixed_launch_kernel(int x); +#ifdef _WIN32 +#define IMPORT __declspec(dllimport) +#else +#define IMPORT +#endif + +IMPORT int call_cuda_seperable_code(int x); +IMPORT int mixed_launch_kernel(int x); int main(int argc, char** argv) { diff --git a/Tests/Cuda/Complex/mixed.cpp b/Tests/Cuda/Complex/mixed.cpp index 205f091..bd32e51 100644 --- a/Tests/Cuda/Complex/mixed.cpp +++ b/Tests/Cuda/Complex/mixed.cpp @@ -1,6 +1,14 @@ +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#define IMPORT __declspec(dllimport) +#else +#define EXPORT +#define IMPORT +#endif + int dynamic_base_func(int); -int cuda_dynamic_host_func(int); +IMPORT int cuda_dynamic_host_func(int); int file3_launch_kernel(int); int dynamic_final_func(int x) @@ -8,7 +16,7 @@ int dynamic_final_func(int x) return cuda_dynamic_host_func(dynamic_base_func(x)); } -int call_cuda_seperable_code(int x) +EXPORT int call_cuda_seperable_code(int x) { return file3_launch_kernel(x); } diff --git a/Tests/Cuda/Complex/mixed.cu b/Tests/Cuda/Complex/mixed.cu index 45b412f..7051de0 100644 --- a/Tests/Cuda/Complex/mixed.cu +++ b/Tests/Cuda/Complex/mixed.cu @@ -4,10 +4,18 @@ #include "file1.h" #include "file2.h" +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#define IMPORT __declspec(dllimport) +#else +#define EXPORT +#define IMPORT +#endif + result_type __device__ file1_func(int x); result_type_dynamic __device__ file2_func(int x); -void __host__ cuda_dynamic_lib_func(); +IMPORT void __host__ cuda_dynamic_lib_func(); static __global__ @@ -17,7 +25,7 @@ void mixed_kernel(result_type& r, int x) result_type_dynamic rd = file2_func(x); } -int mixed_launch_kernel(int x) +EXPORT int mixed_launch_kernel(int x) { cuda_dynamic_lib_func(); diff --git a/Tests/CudaOnly/EnableStandard/main.cu b/Tests/CudaOnly/EnableStandard/main.cu index 83e9dfd..f7144e6 100644 --- a/Tests/CudaOnly/EnableStandard/main.cu +++ b/Tests/CudaOnly/EnableStandard/main.cu @@ -1,8 +1,14 @@ #include +#ifdef _WIN32 +#define IMPORT __declspec(dllimport) +#else +#define IMPORT +#endif + int static_cuda11_func(int); -int shared_cuda11_func(int); +IMPORT int shared_cuda11_func(int); void test_functions() { diff --git a/Tests/CudaOnly/EnableStandard/shared.cu b/Tests/CudaOnly/EnableStandard/shared.cu index 28555b3..ccdd0b2 100644 --- a/Tests/CudaOnly/EnableStandard/shared.cu +++ b/Tests/CudaOnly/EnableStandard/shared.cu @@ -1,9 +1,15 @@ #include +#ifdef _WIN32 +#define EXPORT __declspec(dllexport) +#else +#define EXPORT +#endif + using tt = std::true_type; using ft = std::false_type; -int __host__ shared_cuda11_func(int x) +EXPORT int __host__ shared_cuda11_func(int x) { return x * x + std::integral_constant::value; } diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index c4ca8b9..6c4011c 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -4,7 +4,12 @@ project (CudaOnlyWithDefs CUDA) #verify that we can pass explicit cuda arch flags set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30") -set(debug_compile_flags --generate-code arch=compute_20,code=sm_20 -Xcompiler=-Werror) +set(debug_compile_flags --generate-code arch=compute_20,code=sm_20) +if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + list(APPEND debug_compile_flags -Xcompiler=-WX) +else() + list(APPEND debug_compile_flags -Xcompiler=-Werror) +endif() set(release_compile_defs DEFREL) #Goal for this example: diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu index 33a49d2..67bf10c 100644 --- a/Tests/CudaOnly/WithDefs/main.notcu +++ b/Tests/CudaOnly/WithDefs/main.notcu @@ -2,12 +2,21 @@ #include #include +#ifndef PACKED_DEFINE +#error "PACKED_DEFINE not defined!" +#endif + static __global__ void DetermineIfValidCudaDevice() { } +#ifdef _MSC_VER +#pragma pack(push,1) +#undef PACKED_DEFINE +#define PACKED_DEFINE +#endif struct PACKED_DEFINE result_type { bool valid; @@ -16,6 +25,9 @@ struct PACKED_DEFINE result_type #error missing DEFREL flag #endif }; +#ifdef _MSC_VER +#pragma pack(pop) +#endif result_type can_launch_kernel() { diff --git a/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake new file mode 100644 index 0000000..ea22152 --- /dev/null +++ b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake @@ -0,0 +1,9 @@ +enable_language(CUDA) +try_compile(result ${CMAKE_CURRENT_BINARY_DIR} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.cu + CUDA_STANDARD 3 # bogus, but not used + OUTPUT_VARIABLE out + ) +if(NOT result) + message(FATAL_ERROR "try_compile failed:\n${out}") +endif() diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 5452e6d..6a1bc64 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -36,7 +36,11 @@ elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT) run_cmake(CxxStandardNoDefault) endif() if(CMake_TEST_CUDA) - run_cmake(CudaStandard) + if(CMAKE_HOST_WIN32) + run_cmake(CudaStandardNoDefault) + else() + run_cmake(CudaStandard) + endif() endif() if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) run_cmake(CStandardGNU) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1155170230ebd096df06ebf108908d6c99242d6d commit 1155170230ebd096df06ebf108908d6c99242d6d Author: Brad King AuthorDate: Tue Dec 13 13:10:12 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:04 2017 -0500 CUDA: Populate NVIDIA compiler information on Windows Port Windows-specific compilation and linking rules over from the `Platform/Windows-MSVC` module and adapt it for NVIDIA CUDA. On Windows nvcc and its host compiler (MSVC) do not understand or use options like `-fPIC` or `-std=`, so condition those out. diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 605d555..ae35132 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -1,14 +1,15 @@ set(CMAKE_CUDA_VERBOSE_FLAG "-v") - -set(CMAKE_CUDA_COMPILE_OPTIONS_PIE -Xcompiler=-fPIE) -set(CMAKE_CUDA_COMPILE_OPTIONS_PIC -Xcompiler=-fPIC) -#CMAKE_SHARED_LIBRARY_CUDA_FLAGS is sent to the host linker so we don' need -#to forward it through nvcc -set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC) +if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_COMPILE_OPTIONS_PIE -Xcompiler=-fPIE) + set(CMAKE_CUDA_COMPILE_OPTIONS_PIC -Xcompiler=-fPIC) + set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=) + # CMAKE_SHARED_LIBRARY_CUDA_FLAGS is sent to the host linker so we + # don't need to forward it through nvcc. + set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC) +endif() set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared) set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=) -set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=) string(APPEND CMAKE_CUDA_FLAGS_INIT " ") string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -g") @@ -16,9 +17,12 @@ string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") -set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "") -set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "") -set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11") -set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11") - -set(CMAKE_CUDA_STANDARD_DEFAULT 98) +if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_STANDARD_DEFAULT "") +else() + set(CMAKE_CUDA_STANDARD_DEFAULT 98) + set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11") +endif() diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake new file mode 100644 index 0000000..80ecfbc --- /dev/null +++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake @@ -0,0 +1,42 @@ +include(Platform/Windows-MSVC) + +set(CMAKE_CUDA_COMPILE_PTX_COMPILATION + " ${CMAKE_CUDA_HOST_FLAGS} -x cu -ptx -o -Xcompiler=-Fd,-FS") +set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION + " ${CMAKE_CUDA_HOST_FLAGS} -x cu -dc -o -Xcompiler=-Fd,-FS") +set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION + " ${CMAKE_CUDA_HOST_FLAGS} -x cu -c -o -Xcompiler=-Fd,-FS") + +set(__IMPLICT_LINKS ) +foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES}) + string(APPEND __IMPLICT_LINKS " -LIBPATH:\"${dir}\"") +endforeach() +foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES}) + string(APPEND __IMPLICT_LINKS " \"${lib}\"") +endforeach() +set(CMAKE_CUDA_LINK_EXECUTABLE + " /out: /implib: /pdb: /version:. ${__IMPLICT_LINKS}") + +set(_CMAKE_VS_LINK_DLL " -E vs_link_dll --intdir= --manifests -- ") +set(_CMAKE_VS_LINK_EXE " -E vs_link_exe --intdir= --manifests -- ") +set(CMAKE_CUDA_CREATE_SHARED_LIBRARY + "${_CMAKE_VS_LINK_DLL} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /dll /version:.${_PLATFORM_LINK_FLAGS} ${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}") + +set(CMAKE_CUDA_CREATE_SHARED_MODULE ${CMAKE_CUDA_CREATE_SHARED_LIBRARY}) +set(CMAKE_CUDA_CREATE_STATIC_LIBRARY " /lib ${CMAKE_CL_NOLOGO} /out: ") +set(CMAKE_CUDA_LINKER_SUPPORTS_PDB ON) +set(CMAKE_CUDA_LINK_EXECUTABLE + "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /version:.${_PLATFORM_LINK_FLAGS} ${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}") +unset(_CMAKE_VS_LINK_EXE) +unset(_CMAKE_VS_LINK_EXE) + +set(CMAKE_CUDA_DEVICE_LINK_LIBRARY + " -shared -dlink -o -Xcompiler=-Fd,-FS") +set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE + " -shared -dlink -o -Xcompiler=-Fd,-FS") + +string(APPEND CMAKE_CUDA_FLAGS_INIT " -Xcompiler=-GR,-EHsc") +string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -Xcompiler=-MDd,-Zi,-RTC1") +string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -Xcompiler=-MD") +string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -Xcompiler=-MD") +string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Xcompiler=-MD") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5365421e84e6133f0e038995e3a8232ec46d6a91 commit 5365421e84e6133f0e038995e3a8232ec46d6a91 Author: Brad King AuthorDate: Tue Dec 13 13:06:49 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:03 2017 -0500 CUDA: Detect implicit link information on Windows The `nvcc -v` output on Windows uses response files, so load the one we need to extract the full link line. diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 22c53d9..bef6d0e 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -60,7 +60,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCUDA/(\\./)?(CompilerIdCUDA.xctest/)?CompilerIdCUDA[ \t\n\\\"]") set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_INDEX 2) - set(CMAKE_CUDA_COMPILER_ID_FLAGS_ALWAYS "-v") + set(CMAKE_CUDA_COMPILER_ID_FLAGS_ALWAYS -v --keep --keep-dir tmp) if(CMAKE_CUDA_HOST_COMPILER) list(APPEND CMAKE_CUDA_COMPILER_ID_FLAGS_ALWAYS "-ccbin=${CMAKE_CUDA_HOST_COMPILER}") endif() @@ -106,6 +106,14 @@ if(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA) if("${_nvcc_output_line}" MATCHES "^ *nvlink") string(APPEND _nvcc_log " ignoring nvlink line\n") elseif(_nvcc_libraries) + if("${_nvcc_output_line}" MATCHES "(@\"?tmp/a\\.exe\\.res\"?)") + set(_nvcc_link_res_arg "${CMAKE_MATCH_1}") + set(_nvcc_link_res "${CMAKE_PLATFORM_INFO_DIR}/CompilerIdCUDA/tmp/a.exe.res") + if(EXISTS "${_nvcc_link_res}") + file(READ "${_nvcc_link_res}" _nvcc_link_res_content) + string(REPLACE "${_nvcc_link_res_arg}" "${_nvcc_link_res_content}" _nvcc_output_line "${_nvcc_output_line}") + endif() + endif() string(FIND "${_nvcc_output_line}" "${_nvcc_libraries}" _nvcc_libraries_pos) if(NOT _nvcc_libraries_pos EQUAL -1) set(_nvcc_link_line "${_nvcc_output_line}") diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index eae139d..bb34de5 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -131,6 +131,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src) # Create a clean working directory. file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR}) file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}) + file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}/tmp) CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}") # Construct a description of this test case. diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake index 670b31d..80113cb 100644 --- a/Modules/CMakeTestCUDACompiler.cmake +++ b/Modules/CMakeTestCUDACompiler.cmake @@ -58,6 +58,11 @@ else() include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) CMAKE_DETERMINE_COMPILER_ABI(CUDA ${CMAKE_ROOT}/Modules/CMakeCUDACompilerABI.cu) + if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES "${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES}") + set(CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES "${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES}") + endif() + # Re-configure to save learned information. configure_file( ${CMAKE_ROOT}/Modules/CMakeCUDACompiler.cmake.in https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=522b913f437b04aa10b84cb5807ab43181377d7e commit 522b913f437b04aa10b84cb5807ab43181377d7e Author: Brad King AuthorDate: Tue Dec 13 13:05:20 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:03 2017 -0500 CUDA: Find MSVC binutils on Windows On Windows the host link launcher is just `link.exe`. Find and use that instead of trying to extract the launcher from the `nvcc -v` output. diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index d3024c7..22c53d9 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -116,9 +116,13 @@ if(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA) endif() if(_nvcc_link_line) - #extract the compiler that is being used for linking - separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}") - list(GET _nvcc_link_line_args 0 CMAKE_CUDA_HOST_LINK_LAUNCHER) + if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_CUDA_HOST_LINK_LAUNCHER "${CMAKE_LINKER}") + else() + #extract the compiler that is being used for linking + separate_arguments(_nvcc_link_line_args UNIX_COMMAND "${_nvcc_link_line}") + list(GET _nvcc_link_line_args 0 CMAKE_CUDA_HOST_LINK_LAUNCHER) + endif() #prefix the line with cuda-fake-ld so that implicit link info believes it is #a link line diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 75a031e..4c0486e 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -25,6 +25,7 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC" OR (CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02582b91ad92969d8fbbd845a5d48b3fbd762966 commit 02582b91ad92969d8fbbd845a5d48b3fbd762966 Author: Brad King AuthorDate: Tue Dec 13 13:02:11 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:03 2017 -0500 CUDA: Populate compiler PDB placeholder during device linking The device link step runs the host compiler internally so we need to use the proper compiler PDB file with MSVC. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 480bb34..4bc706c 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -230,6 +230,11 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( this->LocalGenerator->GetCurrentBinaryDirectory(), targetOutputReal), output); + std::string targetFullPathCompilePDB = this->ComputeTargetCompilePDB(); + std::string targetOutPathCompilePDB = + this->LocalGenerator->ConvertToOutputFormat(targetFullPathCompilePDB, + cmOutputConverter::SHELL); + vars.Language = linkLanguage.c_str(); vars.Objects = buildObjs.c_str(); vars.ObjectDir = objectDir.c_str(); @@ -237,6 +242,7 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( vars.LinkLibraries = linkLibs.c_str(); vars.Flags = flags.c_str(); vars.LinkFlags = linkFlags.c_str(); + vars.TargetCompilePDB = targetOutPathCompilePDB.c_str(); std::string launcher; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index d4ad16d..27b7c21 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -366,12 +366,18 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules( this->LocalGenerator->GetCurrentBinaryDirectory(), targetOutputReal), output); + std::string targetFullPathCompilePDB = this->ComputeTargetCompilePDB(); + std::string targetOutPathCompilePDB = + this->LocalGenerator->ConvertToOutputFormat(targetFullPathCompilePDB, + cmOutputConverter::SHELL); + vars.Objects = buildObjs.c_str(); vars.ObjectDir = objectDir.c_str(); vars.Target = target.c_str(); vars.LinkLibraries = linkLibs.c_str(); vars.ObjectsQuoted = buildObjs.c_str(); vars.LinkFlags = linkFlags.c_str(); + vars.TargetCompilePDB = targetOutPathCompilePDB.c_str(); // Add language feature flags. std::string langFlags; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 10ee70d..bc8d8ff 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -229,6 +229,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile) vars.SONameFlag = "$SONAME_FLAG"; vars.TargetSOName = "$SONAME"; vars.TargetPDB = "$TARGET_PDB"; + vars.TargetCompilePDB = "$TARGET_COMPILE_PDB"; vars.Flags = "$FLAGS"; vars.LinkFlags = "$LINK_FLAGS"; @@ -716,6 +717,8 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement() this->ConvertToNinjaPath(objPath), cmOutputConverter::SHELL); EnsureDirectoryExists(objPath); + this->SetMsvcTargetPdbVariable(vars); + if (this->GetGlobalGenerator()->IsGCCOnWindows()) { // ar.exe can't handle backslashes in rsp files (implicitly used by gcc) std::string& linkLibraries = vars["LINK_LIBRARIES"]; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d470cb70077acf2216afe097b5abe379f1828239 commit d470cb70077acf2216afe097b5abe379f1828239 Author: Brad King AuthorDate: Tue Dec 13 13:01:49 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:02 2017 -0500 CUDA: Use `.obj` object file extension on Windows diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index cb0eef5..abc4b66 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -1,7 +1,11 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -set(CMAKE_CUDA_OUTPUT_EXTENSION .o) +if(UNIX) + set(CMAKE_CUDA_OUTPUT_EXTENSION .o) +else() + set(CMAKE_CUDA_OUTPUT_EXTENSION .obj) +endif() set(CMAKE_INCLUDE_FLAG_CUDA "-I") # Load compiler-specific information. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 069011d..480bb34 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -104,10 +104,12 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( // Get the language to use for linking this library. std::string linkLanguage = "CUDA"; + std::string const objExt = + this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); // Get the name of the device object to generate. std::string const targetOutputReal = - this->GeneratorTarget->ObjectDirectory + "cmake_device_link.o"; + this->GeneratorTarget->ObjectDirectory + "cmake_device_link" + objExt; this->DeviceLinkObject = targetOutputReal; this->NumberOfProgressActions++; diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 2b0e1b1..d4ad16d 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -281,6 +281,8 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules( // Get the language to use for linking this library. std::string linkLanguage = "CUDA"; + std::string const objExt = + this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); // Create set of linking flags. std::string linkFlags; @@ -288,7 +290,7 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules( // Get the name of the device object to generate. std::string const targetOutputReal = - this->GeneratorTarget->ObjectDirectory + "cmake_device_link.o"; + this->GeneratorTarget->ObjectDirectory + "cmake_device_link" + objExt; this->DeviceLinkObject = targetOutputReal; this->NumberOfProgressActions++; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 0db5687..10ee70d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -602,10 +602,12 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement() // First and very important step is to make sure while inside this // step our link language is set to CUDA std::string cudaLinkLanguage = "CUDA"; + std::string const objExt = + this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_EXTENSION"); std::string const cfgName = this->GetConfigName(); - std::string const targetOutputReal = - ConvertToNinjaPath(genTarget.ObjectDirectory + "cmake_device_link.o"); + std::string const targetOutputReal = ConvertToNinjaPath( + genTarget.ObjectDirectory + "cmake_device_link" + objExt); std::string const targetOutputImplib = ConvertToNinjaPath(genTarget.GetFullPath(cfgName, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2e80cb0853b3b8306069b833ec8c2128a77b072 commit a2e80cb0853b3b8306069b833ec8c2128a77b072 Author: Brad King AuthorDate: Tue Dec 13 13:00:43 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:02 2017 -0500 CUDA: Detect MSVC architecture id diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index 18291b5..1ba42d9 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -6,6 +6,7 @@ set(CMAKE_CUDA_COMPILER_VERSION "@CMAKE_CUDA_COMPILER_VERSION@") set(CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT "@CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_CUDA_SIMULATE_ID "@CMAKE_CUDA_SIMULATE_ID@") set(CMAKE_CUDA_SIMULATE_VERSION "@CMAKE_CUDA_SIMULATE_VERSION@") + at SET_MSVC_CUDA_ARCHITECTURE_ID@ set(CMAKE_CUDA_COMPILER_ENV_VAR "CUDACXX") set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX") diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index e03de7e..d3024c7 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -70,6 +70,10 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) endif() include(CMakeFindBinUtils) +if(MSVC_CUDA_ARCHITECTURE_ID) + set(SET_MSVC_CUDA_ARCHITECTURE_ID + "set(MSVC_CUDA_ARCHITECTURE_ID ${MSVC_CUDA_ARCHITECTURE_ID})") +endif() #if this compiler vendor is matches NVIDIA we can determine #what the host compiler is. This only needs to be done if the CMAKE_CUDA_HOST_COMPILER diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index f506500..0e90d35 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -54,6 +54,8 @@ if(NOT MSVC_VERSION) set(_compiler_version ${CMAKE_CXX_SIMULATE_VERSION}) elseif(CMAKE_Fortran_SIMULATE_VERSION) set(_compiler_version ${CMAKE_Fortran_SIMULATE_VERSION}) + elseif(CMAKE_CUDA_SIMULATE_VERSION) + set(_compiler_version ${CMAKE_CUDA_SIMULATE_VERSION}) elseif(CMAKE_C_COMPILER_VERSION) set(_compiler_version ${CMAKE_C_COMPILER_VERSION}) else() diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 23caead..8ad2efe 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -344,7 +344,8 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const { cmMakefile* mf = this->GetMakefile(); if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") || - mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID")) { + mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID") || + mf->GetDefinition("MSVC_CUDA_ARCHITECTURE_ID")) { std::string pdbPath; std::string compilePdbPath = this->ComputeTargetCompilePDB(); if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE || https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65c1e012ffc17ab77e5aaa84b22241a81de4c2ce commit 65c1e012ffc17ab77e5aaa84b22241a81de4c2ce Author: Brad King AuthorDate: Tue Dec 13 12:58:35 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:02 2017 -0500 CUDA: Detect use of MSVC host compiler Report it in `CMAKE_CUDA_SIMULATE_{ID,VERSION}`. diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index 8a6c0bc..18291b5 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -4,6 +4,8 @@ set(CMAKE_CUDA_HOST_LINK_LAUNCHER "@CMAKE_CUDA_HOST_LINK_LAUNCHER@") set(CMAKE_CUDA_COMPILER_ID "@CMAKE_CUDA_COMPILER_ID@") set(CMAKE_CUDA_COMPILER_VERSION "@CMAKE_CUDA_COMPILER_VERSION@") set(CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT "@CMAKE_CUDA_STANDARD_COMPUTED_DEFAULT@") +set(CMAKE_CUDA_SIMULATE_ID "@CMAKE_CUDA_SIMULATE_ID@") +set(CMAKE_CUDA_SIMULATE_VERSION "@CMAKE_CUDA_SIMULATE_VERSION@") set(CMAKE_CUDA_COMPILER_ENV_VAR "CUDACXX") set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX") diff --git a/Modules/CMakeCUDACompilerId.cu.in b/Modules/CMakeCUDACompilerId.cu.in index a20f1b1..018bab7 100644 --- a/Modules/CMakeCUDACompilerId.cu.in +++ b/Modules/CMakeCUDACompilerId.cu.in @@ -9,6 +9,9 @@ because some compilers will just produce instructions to fill the array rather than assigning a pointer to a static array. */ char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif @CMAKE_CUDA_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CUDA_COMPILER_ID_ERROR_FOR_TEST@ @@ -35,6 +38,12 @@ int main(int argc, char* argv[]) #ifdef COMPILER_VERSION_MAJOR require += info_version[argc]; #endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif require += info_language_dialect_default[argc]; (void)argv; return require; diff --git a/Modules/Compiler/NVIDIA-DetermineCompiler.cmake b/Modules/Compiler/NVIDIA-DetermineCompiler.cmake index 32ccf8a..cb0beaf 100644 --- a/Modules/Compiler/NVIDIA-DetermineCompiler.cmake +++ b/Modules/Compiler/NVIDIA-DetermineCompiler.cmake @@ -4,4 +4,14 @@ set(_compiler_id_pp_test "defined(__NVCC__)") set(_compiler_id_version_compute " # define @PREFIX at COMPILER_VERSION_MAJOR @MACRO_DEC@(__CUDACC_VER_MAJOR__) # define @PREFIX at COMPILER_VERSION_MINOR @MACRO_DEC@(__CUDACC_VER_MINOR__) -# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@(__CUDACC_VER_BUILD__)") +# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@(__CUDACC_VER_BUILD__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define @PREFIX at SIMULATE_VERSION_MAJOR @MACRO_DEC@(_MSC_VER / 100) +# define @PREFIX at SIMULATE_VERSION_MINOR @MACRO_DEC@(_MSC_VER % 100) +# endif") + +set(_compiler_id_simulate " +# if defined(_MSC_VER) +# define @PREFIX at SIMULATE_ID \"MSVC\" +# endif") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=945dd207b6ca6ca38e3b87247836eb1b3d5f8a77 commit 945dd207b6ca6ca38e3b87247836eb1b3d5f8a77 Author: Brad King AuthorDate: Tue Dec 13 13:04:18 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:02 2017 -0500 CUDA: Allow platform files to set device linking rules Condition the default settings on the rule variables not already being set. diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index 202a7a6..cb0eef5 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -177,11 +177,14 @@ if(NOT CMAKE_CUDA_LINK_EXECUTABLE) endif() #These are used when linking relocatable (dc) cuda code -set(CMAKE_CUDA_DEVICE_LINK_LIBRARY - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") -set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") - +if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY) + set(CMAKE_CUDA_DEVICE_LINK_LIBRARY + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") +endif() +if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE) + set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") +endif() mark_as_advanced( CMAKE_CUDA_FLAGS https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95420cea5e12d21957a50dae20f90c2e83571758 commit 95420cea5e12d21957a50dae20f90c2e83571758 Author: Brad King AuthorDate: Tue Dec 13 11:08:53 2016 -0500 Commit: Brad King CommitDate: Thu Jan 12 10:39:01 2017 -0500 CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 2031ba5..3469d34 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -45,6 +45,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj endif() list(GET args 0 cmd) endif() + set(is_msvc 0) if("${cmd}" MATCHES "${linker_regex}") string(APPEND log " link line: [${line}]\n") string(REGEX REPLACE ";-([LYz]);" ";-\\1" args "${args}") @@ -54,6 +55,17 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj string(REGEX REPLACE "^-L" "" dir "${arg}") list(APPEND implicit_dirs_tmp ${dir}) string(APPEND log " arg [${arg}] ==> dir [${dir}]\n") + elseif("${arg}" MATCHES "^[-/]LIBPATH:(.+)") + # MSVC search path. + set(dir "${CMAKE_MATCH_1}") + list(APPEND implicit_dirs_tmp ${dir}) + string(APPEND log " arg [${arg}] ==> dir [${dir}]\n") + elseif(is_msvc AND "${arg}" STREQUAL "-link") + string(APPEND log " arg [${arg}] ==> ignore MSVC cl option\n") + elseif(is_msvc AND "${arg}" MATCHES "^(.*\\.[Ll][Ii][Bb])$") + set(lib "${CMAKE_MATCH_1}") + list(APPEND implicit_libs_tmp ${lib}) + string(APPEND log " arg [${arg}] ==> lib [${lib}]\n") elseif("${arg}" MATCHES "^-l([^:].*)$") # Unix library. set(lib "${CMAKE_MATCH_1}") @@ -82,6 +94,9 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # Link editor option. list(APPEND implicit_libs_tmp ${arg}) string(APPEND log " arg [${arg}] ==> opt [${arg}]\n") + elseif("${arg}" STREQUAL "cl.exe") + string(APPEND log " arg [${arg}] ==> recognize MSVC cl\n") + set(is_msvc 1) else() string(APPEND log " arg [${arg}] ==> ignore\n") endif() diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in index 1313dbf..d6d2357 100644 --- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in +++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in @@ -518,6 +518,13 @@ set(msys_g77_libs "frtbegin;g2c;mingw32;moldname;mingwex;msvcrt;user32;kernel32; set(msys_g77_dirs "C:/some-mingw/lib/gcc/mingw32/3.4.5;C:/some-mingw/lib/gcc;/some-mingw/lib;C:/some-mingw/lib") list(APPEND platforms msys_g77) +#----------------------------------------------------------------------------- +# MSVC from NVIDIA CUDA + +set(nvcc_msvc_text [[cuda-fake-ld cl.exe -nologo "tmp/a_dlink.obj" "tmp/CMakeCUDACompilerId.obj" -link -INCREMENTAL:NO "/LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/../lib/x64" cudadevrt.lib cudart_static.lib -Fe"a.exe"]]) +set(nvcc_msvc_libs "cudadevrt.lib;cudart_static.lib") +set(nvcc_msvc_dirs "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64") +list(APPEND platforms nvcc_msvc) #----------------------------------------------------------------------------- # Test parsing for all above examples. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 10:41:59 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 10:41:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.7.1-1078-g728820f Message-ID: <20170112154159.EA214F9EBB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 728820f3ea0faf55ffe1236a44a35e9197fc6291 (commit) via f9a810f7b39406e00998c6e74e5a7d7d218d5aba (commit) via 5599d858c7881b4331c449ba5c59d255ed50bd11 (commit) via 1155170230ebd096df06ebf108908d6c99242d6d (commit) via 5365421e84e6133f0e038995e3a8232ec46d6a91 (commit) via 522b913f437b04aa10b84cb5807ab43181377d7e (commit) via 02582b91ad92969d8fbbd845a5d48b3fbd762966 (commit) via d470cb70077acf2216afe097b5abe379f1828239 (commit) via a2e80cb0853b3b8306069b833ec8c2128a77b072 (commit) via 65c1e012ffc17ab77e5aaa84b22241a81de4c2ce (commit) via 945dd207b6ca6ca38e3b87247836eb1b3d5f8a77 (commit) via 95420cea5e12d21957a50dae20f90c2e83571758 (commit) from 9f3eff6f5675851c81f093d16310d17e3754cd5f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=728820f3ea0faf55ffe1236a44a35e9197fc6291 commit 728820f3ea0faf55ffe1236a44a35e9197fc6291 Merge: 9f3eff6 f9a810f Author: Brad King AuthorDate: Thu Jan 12 10:41:57 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 10:41:57 2017 -0500 Merge topic 'cuda-windows' f9a810f7 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls 5599d858 CUDA: Port test cases to Windows with MSVC host compiler 11551702 CUDA: Populate NVIDIA compiler information on Windows 5365421e CUDA: Detect implicit link information on Windows 522b913f CUDA: Find MSVC binutils on Windows 02582b91 CUDA: Populate compiler PDB placeholder during device linking d470cb70 CUDA: Use `.obj` object file extension on Windows a2e80cb0 CUDA: Detect MSVC architecture id 65c1e012 CUDA: Detect use of MSVC host compiler 945dd207 CUDA: Allow platform files to set device linking rules 95420cea CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCUDACompiler.cmake.in | 3 ++ Modules/CMakeCUDACompilerId.cu.in | 9 +++++ Modules/CMakeCUDAInformation.cmake | 19 ++++++--- Modules/CMakeDetermineCUDACompiler.cmake | 24 +++++++++-- Modules/CMakeDetermineCompilerId.cmake | 1 + Modules/CMakeFindBinUtils.cmake | 1 + Modules/CMakeParseImplicitLinkInfo.cmake | 15 +++++++ Modules/CMakeTestCUDACompiler.cmake | 5 +++ Modules/Compiler/NVIDIA-CUDA.cmake | 30 ++++++++------ Modules/Compiler/NVIDIA-DetermineCompiler.cmake | 12 +++++- Modules/Platform/Windows-MSVC.cmake | 2 + Modules/Platform/Windows-NVIDIA-CUDA.cmake | 42 ++++++++++++++++++++ Source/cmMakefileExecutableTargetGenerator.cxx | 10 ++++- Source/cmMakefileLibraryTargetGenerator.cxx | 10 ++++- Source/cmNinjaNormalTargetGenerator.cxx | 9 ++++- Source/cmNinjaTargetGenerator.cxx | 3 +- Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 7 ++++ Tests/Cuda/Complex/dynamic.cpp | 8 +++- Tests/Cuda/Complex/dynamic.cu | 10 ++++- Tests/Cuda/Complex/main.cpp | 10 ++++- Tests/Cuda/Complex/mixed.cpp | 12 +++++- Tests/Cuda/Complex/mixed.cu | 12 +++++- Tests/CudaOnly/EnableStandard/main.cu | 8 +++- Tests/CudaOnly/EnableStandard/shared.cu | 8 +++- Tests/CudaOnly/SeparateCompilation/main.cu | 8 ++-- Tests/CudaOnly/WithDefs/CMakeLists.txt | 7 +++- Tests/CudaOnly/WithDefs/main.notcu | 12 ++++++ ...NoDefault.cmake => CudaStandardNoDefault.cmake} | 6 +-- Tests/RunCMake/try_compile/RunCMakeTest.cmake | 6 ++- 29 files changed, 260 insertions(+), 49 deletions(-) create mode 100644 Modules/Platform/Windows-NVIDIA-CUDA.cmake copy Tests/RunCMake/try_compile/{CxxStandardNoDefault.cmake => CudaStandardNoDefault.cmake} (58%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 11:51:19 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 11:51:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2127-g973ae1b Message-ID: <20170112165119.DC6BEFA659@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 973ae1be388c84b11b3ad57e4971f9be92f03bd8 (commit) via 0362c60fe5f4e7e4011f14dc2519ffb1bc6c8ce8 (commit) via 577f721fb70bbf6c29c40d5f10d4319370ccb1f8 (commit) from 5a1cd30ba35674baad81b42970528fb6e2c83f14 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=973ae1be388c84b11b3ad57e4971f9be92f03bd8 commit 973ae1be388c84b11b3ad57e4971f9be92f03bd8 Merge: 5a1cd30 0362c60 Author: Brad King AuthorDate: Thu Jan 12 11:51:19 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 11:51:19 2017 -0500 Merge topic 'vs15-detect-from-installer' into next 0362c60f cmVSSetupHelper: Simplify use of EnumerateAndChooseVSInstance 577f721f VS: Fix detection of VS 2017 installation with WindowsStore https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0362c60fe5f4e7e4011f14dc2519ffb1bc6c8ce8 commit 0362c60fe5f4e7e4011f14dc2519ffb1bc6c8ce8 Author: Brad King AuthorDate: Thu Jan 12 11:29:06 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 11:32:44 2017 -0500 cmVSSetupHelper: Simplify use of EnumerateAndChooseVSInstance This method short-circuits when an instance has already been chosen, so avoid duplicating this check at call sites. diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index 2091b5c..c2ff664 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -73,44 +73,19 @@ cmVSSetupAPIHelper::~cmVSSetupAPIHelper() bool cmVSSetupAPIHelper::IsVS2017Installed() { - bool ret = false; - if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { - ret = EnumerateAndChooseVSInstance(); - } else { - ret = true; - } - - return ret; + return this->EnumerateAndChooseVSInstance(); } bool cmVSSetupAPIHelper::IsWin10SDKInstalled() { - bool isWin10SDKInstalled = false; - if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { - if (EnumerateAndChooseVSInstance() && - chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { - isWin10SDKInstalled = chosenInstanceInfo.IsWin10SDKInstalled; - } - } else { - isWin10SDKInstalled = chosenInstanceInfo.IsWin10SDKInstalled; - } - - return isWin10SDKInstalled; + return (this->EnumerateAndChooseVSInstance() && + chosenInstanceInfo.IsWin10SDKInstalled); } bool cmVSSetupAPIHelper::IsWin81SDKInstalled() { - bool isWin81SDKInstalled = false; - if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { - if (EnumerateAndChooseVSInstance() && - chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { - isWin81SDKInstalled = chosenInstanceInfo.IsWin81SDKInstalled; - } - } else { - isWin81SDKInstalled = chosenInstanceInfo.IsWin81SDKInstalled; - } - - return isWin81SDKInstalled; + return (this->EnumerateAndChooseVSInstance() && + chosenInstanceInfo.IsWin81SDKInstalled); } bool cmVSSetupAPIHelper::CheckInstalledComponent( @@ -243,18 +218,12 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo( bool cmVSSetupAPIHelper::GetVSInstanceInfo(std::string& vsInstallLocation) { vsInstallLocation = ""; - bool isInstalled = false; - - if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { - isInstalled = EnumerateAndChooseVSInstance(); - } + bool isInstalled = this->EnumerateAndChooseVSInstance(); - // Enumerate and choose best VS instance - if (chosenInstanceInfo.VSInstallLocation.compare(L"") != 0) { + if (isInstalled) { std::string str(chosenInstanceInfo.VSInstallLocation.begin(), chosenInstanceInfo.VSInstallLocation.end()); vsInstallLocation = str; - isInstalled = true; } return isInstalled; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=577f721fb70bbf6c29c40d5f10d4319370ccb1f8 commit 577f721fb70bbf6c29c40d5f10d4319370ccb1f8 Author: Brad King AuthorDate: Thu Jan 12 11:25:14 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 11:29:35 2017 -0500 VS: Fix detection of VS 2017 installation with WindowsStore Fix logic in cmVSSetupAPIHelper::IsVS2017Installed to work correctly on repeat calls. Closes: #16549 diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index d675a2c..2091b5c 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -76,6 +76,8 @@ bool cmVSSetupAPIHelper::IsVS2017Installed() bool ret = false; if (chosenInstanceInfo.VSInstallLocation.compare(L"") == 0) { ret = EnumerateAndChooseVSInstance(); + } else { + ret = true; } return ret; ----------------------------------------------------------------------- Summary of changes: Source/cmVSSetupHelper.cxx | 43 +++++++------------------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 15:08:53 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 15:08:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2130-g0401481 Message-ID: <20170112200853.3111FFA42F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 040148125575371543ea890762da9f4467b9529e (commit) via 05dbc940b7e19cdccd7ec73ea173719be66244e1 (commit) via 728820f3ea0faf55ffe1236a44a35e9197fc6291 (commit) from 973ae1be388c84b11b3ad57e4971f9be92f03bd8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=040148125575371543ea890762da9f4467b9529e commit 040148125575371543ea890762da9f4467b9529e Merge: 973ae1b 05dbc94 Author: Brad King AuthorDate: Thu Jan 12 15:08:51 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 15:08:51 2017 -0500 Merge topic 'cuda-no-def-file-for-device' into next 05dbc940 CUDA: Don't use module definition `.def` files for device linking 728820f3 Merge topic 'cuda-windows' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05dbc940b7e19cdccd7ec73ea173719be66244e1 commit 05dbc940b7e19cdccd7ec73ea173719be66244e1 Author: Robert Maynard AuthorDate: Thu Jan 12 13:57:27 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 15:07:10 2017 -0500 CUDA: Don't use module definition `.def` files for device linking These files are meaningful only to the host linker. diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 4bc706c..b76ddeb 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -157,15 +157,6 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule( 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); - } - // Construct a list of files associated with this executable that // may need to be cleaned. std::vector exeCleanFiles; diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index bc8d8ff..b172478 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -663,7 +663,6 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement() this->addPoolNinjaVariable("JOB_POOL_LINK", &genTarget, vars); - this->AddModuleDefinitionFlag(linkLineComputer.get(), vars["LINK_FLAGS"]); vars["LINK_FLAGS"] = cmGlobalNinjaGenerator::EncodeLiteral(vars["LINK_FLAGS"]); ----------------------------------------------------------------------- Summary of changes: Source/cmMakefileExecutableTargetGenerator.cxx | 9 --------- Source/cmNinjaNormalTargetGenerator.cxx | 1 - 2 files changed, 10 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 15:11:46 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 15:11:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2132-g7508f58 Message-ID: <20170112201147.17D1AF3B0F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7508f58de59e532dd011edc3c0281ff60aaad7b8 (commit) via 47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c (commit) from 040148125575371543ea890762da9f4467b9529e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7508f58de59e532dd011edc3c0281ff60aaad7b8 commit 7508f58de59e532dd011edc3c0281ff60aaad7b8 Merge: 0401481 47ffa0e Author: Brad King AuthorDate: Thu Jan 12 15:11:45 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 15:11:45 2017 -0500 Merge topic 'ninja-no-static-lib-def-file' into next 47ffa0ea Ninja: Do not use module definition `.def` files for static libraries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c commit 47ffa0ea5d6cf08bd891d889ce67bee8008ebd8c Author: Brad King AuthorDate: Wed Jan 11 15:56:21 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 13:35:48 2017 -0500 Ninja: Do not use module definition `.def` files for static libraries A module definition (`.def`) file specifies symbols to export from a linked binary. The librarian tool is not a linker and so should not be given a `/DEF:...` flag with the `.def` file. The other generators already do not do this, so fix Ninja to be consistent. Closes: #16537 diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 7e113ab..239582f 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -63,6 +63,13 @@ void cmCommonTargetGenerator::AddFeatureFlags(std::string& flags, void cmCommonTargetGenerator::AddModuleDefinitionFlag( cmLinkLineComputer* linkLineComputer, std::string& flags) { + // A module definition file only makes sense on certain target types. + if (this->GeneratorTarget->GetType() != cmStateEnums::SHARED_LIBRARY && + this->GeneratorTarget->GetType() != cmStateEnums::MODULE_LIBRARY && + this->GeneratorTarget->GetType() != cmStateEnums::EXECUTABLE) { + return; + } + if (!this->ModuleDefinitionFile) { return; } ----------------------------------------------------------------------- Summary of changes: Source/cmCommonTargetGenerator.cxx | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 15:24:31 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 15:24:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2134-g927c6bf Message-ID: <20170112202431.0FBDEFA028@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 927c6bf2a8f640f4a60bf3acc97af8d838a29969 (commit) via e2210140b158c7f8edffe4875722165928566fc0 (commit) from 7508f58de59e532dd011edc3c0281ff60aaad7b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=927c6bf2a8f640f4a60bf3acc97af8d838a29969 commit 927c6bf2a8f640f4a60bf3acc97af8d838a29969 Merge: 7508f58 e221014 Author: Brad King AuthorDate: Thu Jan 12 15:24:27 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 15:24:27 2017 -0500 Merge topic 'source_group-tree' into next e2210140 source_group: Add options create groups matching directory tree https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2210140b158c7f8edffe4875722165928566fc0 commit e2210140b158c7f8edffe4875722165928566fc0 Author: Mateusz Janek AuthorDate: Wed Dec 21 15:27:49 2016 +0100 Commit: Brad King CommitDate: Wed Jan 11 11:08:00 2017 -0500 source_group: Add options create groups matching directory tree Add `TREE` and `PREFIX` arguments to enable this behavior. diff --git a/Help/command/source_group.rst b/Help/command/source_group.rst index 6e3829c..938ca40 100644 --- a/Help/command/source_group.rst +++ b/Help/command/source_group.rst @@ -2,15 +2,27 @@ source_group ------------ Define a grouping for source files in IDE project generation. +There are two different signatures to create source groups. -.. code-block:: cmake +:: source_group( [FILES ...] [REGULAR_EXPRESSION ]) + source_group(TREE [PREFIX ] [FILES ...]) Defines a group into which sources will be placed in project files. This is intended to set up file tabs in Visual Studio. The options are: +``TREE`` + CMake will automatically detect, from ```` files paths, source groups + it needs to create, to keep structure of source groups analogically to the + actual files and directories structure in the project. Paths of ```` + files will be cut to be relative to ````. + +``PREFIX`` + Source group and files located directly in ```` path, will be placed + in ```` source groups. + ``FILES`` Any source file specified explicitly will be placed in group ````. Relative paths are interpreted with respect to the @@ -25,11 +37,13 @@ explicitly lists the file with ``FILES`` will be favored, if any. If no group explicitly lists the file, the *last* group whose regular expression matches the file will be favored. -The ```` of the group may contain backslashes to specify subgroups: +The ```` of the group and ```` argument may contain backslashes +to specify subgroups: .. code-block:: cmake source_group(outer\\inner ...) + source_group(TREE PREFIX sources\\inc ...) For backwards compatibility, the short-hand signature diff --git a/Help/release/dev/source_group-tree.rst b/Help/release/dev/source_group-tree.rst new file mode 100644 index 0000000..c5fec1d --- /dev/null +++ b/Help/release/dev/source_group-tree.rst @@ -0,0 +1,5 @@ +source_group-tree +----------------- + +* The :command:`source_group` command gained ``TREE`` and ``PREFIX`` + options to add groups following source tree directory structure. diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 3f20d4e..dac4b82 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -8,6 +8,99 @@ #include "cmSourceGroup.h" #include "cmSystemTools.h" +namespace { +const size_t RootIndex = 1; +const size_t FilesWithoutPrefixKeywordIndex = 2; +const size_t FilesWithPrefixKeywordIndex = 4; +const size_t PrefixKeywordIdex = 2; + +std::vector tokenizePath(const std::string& path) +{ + return cmSystemTools::tokenize(path, "\\/"); +} + +std::string getFullFilePath(const std::string& currentPath, + const std::string& path) +{ + std::string fullPath = path; + + if (!cmSystemTools::FileIsFullPath(path.c_str())) { + fullPath = currentPath; + fullPath += "/"; + fullPath += path; + } + + return cmSystemTools::CollapseFullPath(fullPath); +} + +std::set getSourceGroupFilesPaths( + const std::string& currentPath, const std::string& root, + const std::vector& files) +{ + std::set ret; + const std::string::size_type rootLength = root.length(); + + for (size_t i = 0; i < files.size(); ++i) { + const std::string fullPath = getFullFilePath(currentPath, files[i]); + + ret.insert(fullPath.substr(rootLength + 1)); // +1 to also omnit last '/' + } + + return ret; +} + +cmSourceGroup* addSourceGroup(const std::vector& tokenizedPath, + cmMakefile& makefile) +{ + cmSourceGroup* sg; + + sg = makefile.GetSourceGroup(tokenizedPath); + if (!sg) { + makefile.AddSourceGroup(tokenizedPath); + sg = makefile.GetSourceGroup(tokenizedPath); + if (!sg) { + return CM_NULLPTR; + } + } + + return sg; +} + +bool addFilesToItsSourceGroups(const std::set& sgFilesPaths, + const std::string& prefix, cmMakefile& makefile, + std::string& errorMsg) +{ + cmSourceGroup* sg; + + for (std::set::const_iterator it = std::begin(sgFilesPaths); + it != std::end(sgFilesPaths); ++it) { + + std::vector tokenizedPath; + if (!prefix.empty()) { + tokenizedPath = tokenizePath(prefix + '/' + *it); + } else { + tokenizedPath = tokenizePath(*it); + } + + if (tokenizedPath.size() > 1) { + tokenizedPath.pop_back(); + + sg = addSourceGroup(tokenizedPath, makefile); + + if (!sg) { + errorMsg = "Could not create source group for file: " + *it; + return false; + } + const std::string fullPath = + getFullFilePath(makefile.GetCurrentSourceDirectory(), *it); + sg->AddGroupFile(fullPath); + } + } + + return true; +} +} + class cmExecutionStatus; // cmSourceGroupCommand @@ -19,6 +112,17 @@ bool cmSourceGroupCommand::InitialPass(std::vector const& args, return false; } + if (args[0] == "TREE") { + std::string error; + + if (!processTree(args, error)) { + this->SetError(error); + return false; + } + + return true; + } + std::string delimiter = "\\"; if (this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER")) { delimiter = this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER"); @@ -82,3 +186,64 @@ bool cmSourceGroupCommand::InitialPass(std::vector const& args, return true; } + +bool cmSourceGroupCommand::checkTreeArgumentsPreconditions( + const std::vector& args, std::string& errorMsg) const +{ + if (args.size() == 1) { + errorMsg = "TREE argument given without a root."; + return false; + } + + if (args.size() < 3) { + errorMsg = "Missing FILES arguments."; + return false; + } + + if (args[FilesWithoutPrefixKeywordIndex] != "FILES" && + args[PrefixKeywordIdex] != "PREFIX") { + errorMsg = "Unknown argument \"" + args[2] + + "\". Perhaps the FILES keyword is missing.\n"; + return false; + } + + if (args[PrefixKeywordIdex] == "PREFIX" && + (args.size() < 5 || args[FilesWithPrefixKeywordIndex] != "FILES")) { + errorMsg = "Missing FILES arguments."; + return false; + } + + return true; +} + +bool cmSourceGroupCommand::processTree(const std::vector& args, + std::string& errorMsg) +{ + if (!checkTreeArgumentsPreconditions(args, errorMsg)) { + return false; + } + + const std::string root = cmSystemTools::CollapseFullPath(args[RootIndex]); + std::string prefix; + size_t filesBegin = FilesWithoutPrefixKeywordIndex + 1; + if (args[PrefixKeywordIdex] == "PREFIX") { + prefix = args[PrefixKeywordIdex + 1]; + filesBegin = FilesWithPrefixKeywordIndex + 1; + } + + const std::vector filesVector(args.cbegin() + filesBegin, + args.cend()); + + std::set sourceGroupPaths = getSourceGroupFilesPaths( + this->Makefile->GetCurrentSourceDirectory(), root, filesVector); + + addFilesToItsSourceGroups(sourceGroupPaths, prefix, *(this->Makefile), + errorMsg); + + if (!errorMsg.empty()) { + this->SetError(errorMsg.c_str()); + return false; + } + + return true; +} diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index f533be1..5549096 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -36,6 +36,12 @@ public: * The name of the command as specified in CMakeList.txt. */ std::string GetName() const CM_OVERRIDE { return "source_group"; } + +private: + bool processTree(const std::vector& args, + std::string& errorMsg); + bool checkTreeArgumentsPreconditions(const std::vector& args, + std::string& errorMsg) const; }; #endif diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt index 6573c82..9289e84 100644 --- a/Tests/SourceGroups/CMakeLists.txt +++ b/Tests/SourceGroups/CMakeLists.txt @@ -30,6 +30,17 @@ source_group(Base\\Sub1\\Base FILES bar.c) # a group without files, is currently not created source_group(EmptyGroup) +set(root ${CMAKE_CURRENT_SOURCE_DIR}) -add_executable(SourceGroups main.c bar.c foo.c sub1/foo.c sub1/foobar.c baz.c README.txt) +set(tree_files_without_prefix ${root}/sub1/tree_bar.c + ${root}/sub1/tree_baz.c + ${root}/sub1/tree_subdir/tree_foobar.c) +set(tree_files_with_prefix ${root}/tree_foo.c) + +source_group(TREE ${root} FILES ${tree_files_without_prefix}) + +source_group(TREE ${root} PREFIX tree_root/subgroup FILES ${tree_files_with_prefix}) + +add_executable(SourceGroups main.c bar.c foo.c sub1/foo.c sub1/foobar.c baz.c + ${tree_files_with_prefix} ${tree_files_without_prefix} README.txt) diff --git a/Tests/SourceGroups/main.c b/Tests/SourceGroups/main.c index f259f98..b88f2f8 100644 --- a/Tests/SourceGroups/main.c +++ b/Tests/SourceGroups/main.c @@ -5,10 +5,17 @@ extern int bar(void); extern int foobar(void); extern int barbar(void); extern int baz(void); +extern int tree_foo(void); +extern int tree_bar(void); +extern int tree_foobar(void); +extern int tree_baz(void); int main() { printf("foo: %d bar: %d foobar: %d barbar: %d baz: %d\n", foo(), bar(), foobar(), barbar(), baz()); + + printf("tree_foo: %d tree_bar: %d tree_foobar: %d tree_baz: %d\n", + tree_foo(), tree_bar(), tree_foobar(), tree_baz()); return 0; } diff --git a/Tests/SourceGroups/sub1/tree_bar.c b/Tests/SourceGroups/sub1/tree_bar.c new file mode 100644 index 0000000..6b79239 --- /dev/null +++ b/Tests/SourceGroups/sub1/tree_bar.c @@ -0,0 +1,4 @@ +int tree_bar(void) +{ + return 8; +} diff --git a/Tests/SourceGroups/sub1/tree_baz.c b/Tests/SourceGroups/sub1/tree_baz.c new file mode 100644 index 0000000..27ff5ab --- /dev/null +++ b/Tests/SourceGroups/sub1/tree_baz.c @@ -0,0 +1,4 @@ +int tree_baz(void) +{ + return 9; +} diff --git a/Tests/SourceGroups/sub1/tree_subdir/tree_foobar.c b/Tests/SourceGroups/sub1/tree_subdir/tree_foobar.c new file mode 100644 index 0000000..e955e04 --- /dev/null +++ b/Tests/SourceGroups/sub1/tree_subdir/tree_foobar.c @@ -0,0 +1,4 @@ +int tree_foobar(void) +{ + return 7; +} diff --git a/Tests/SourceGroups/tree_foo.c b/Tests/SourceGroups/tree_foo.c new file mode 100644 index 0000000..d392e41 --- /dev/null +++ b/Tests/SourceGroups/tree_foo.c @@ -0,0 +1,4 @@ +int tree_foo(void) +{ + return 6; +} ----------------------------------------------------------------------- Summary of changes: Help/command/source_group.rst | 18 ++- Help/release/dev/source_group-tree.rst | 5 + Source/cmSourceGroupCommand.cxx | 165 +++++++++++++++++++++ Source/cmSourceGroupCommand.h | 6 + Tests/SourceGroups/CMakeLists.txt | 13 +- Tests/SourceGroups/main.c | 7 + Tests/SourceGroups/sub1/tree_bar.c | 4 + Tests/SourceGroups/sub1/tree_baz.c | 4 + Tests/SourceGroups/sub1/tree_subdir/tree_foobar.c | 4 + Tests/SourceGroups/tree_foo.c | 4 + 10 files changed, 227 insertions(+), 3 deletions(-) create mode 100644 Help/release/dev/source_group-tree.rst create mode 100644 Tests/SourceGroups/sub1/tree_bar.c create mode 100644 Tests/SourceGroups/sub1/tree_baz.c create mode 100644 Tests/SourceGroups/sub1/tree_subdir/tree_foobar.c create mode 100644 Tests/SourceGroups/tree_foo.c hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 15:30:27 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 15:30:27 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2137-gc52c367 Message-ID: <20170112203027.54FDEFA36F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via c52c3679f3653ad0e34b35f08b9ccf780f3e5473 (commit) via 8d1f9e5b850e02d304e4c209e720f06e25837470 (commit) via dc5051f1c1b7604b9c05e04bdccdff222b69efa0 (commit) from 927c6bf2a8f640f4a60bf3acc97af8d838a29969 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c52c3679f3653ad0e34b35f08b9ccf780f3e5473 commit c52c3679f3653ad0e34b35f08b9ccf780f3e5473 Merge: 927c6bf 8d1f9e5 Author: Brad King AuthorDate: Thu Jan 12 15:30:25 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 15:30:25 2017 -0500 Merge topic 'cuda_propagate_flags_when_dlink_on_executables' into next 8d1f9e5b CUDA: Now pass correct FLAGS when device link cuda executables. dc5051f1 CUDA: Test that CUDA flags are used when device linking executables. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d1f9e5b850e02d304e4c209e720f06e25837470 commit 8d1f9e5b850e02d304e4c209e720f06e25837470 Author: Robert Maynard AuthorDate: Thu Jan 5 16:31:36 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 15:13:36 2017 -0500 CUDA: Now pass correct FLAGS when device link cuda executables. Previously we had a two issues when building cuda executables that required separable compilation. The first was that we didn't propagate FLAGS causing any -arch / -gencode flags to be dropped, and secondly generators such as ninja would use the CXX language flags instead of CUDA when the executable was mixed language. diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index 1ba42d9..7e8efa7 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -13,6 +13,8 @@ set(CMAKE_CUDA_HOST_COMPILER_ENV_VAR "CUDAHOSTCXX") set(CMAKE_CUDA_COMPILER_ID_RUN 1) set(CMAKE_CUDA_SOURCE_FILE_EXTENSIONS cu) +set(CMAKE_CUDA_LINKER_PREFERENCE 10) +set(CMAKE_CUDA_LINKER_PREFERENCE_PROPAGATES 1) set(CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES@") set(CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES@") diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index abc4b66..13b1789 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -187,7 +187,7 @@ if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY) endif() if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE) set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") endif() mark_as_advanced( diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake index 80ecfbc..809ee06 100644 --- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake +++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake @@ -33,7 +33,7 @@ unset(_CMAKE_VS_LINK_EXE) set(CMAKE_CUDA_DEVICE_LINK_LIBRARY " -shared -dlink -o -Xcompiler=-Fd,-FS") set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - " -shared -dlink -o -Xcompiler=-Fd,-FS") + " -shared -dlink -o -Xcompiler=-Fd,-FS") string(APPEND CMAKE_CUDA_FLAGS_INIT " -Xcompiler=-GR,-EHsc") string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -Xcompiler=-MDd,-Zi,-RTC1") diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index cf0cf88..e728632 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -184,3 +184,9 @@ std::string cmLinkLineComputer::ComputeLinkLibraries( return fout.str(); } + +std::string cmLinkLineComputer::GetLinkerLanguage(cmGeneratorTarget* target, + std::string const& config) +{ + return target->GetLinkerLanguage(config); +} diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index bb13717..57a70bc 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -11,6 +11,7 @@ #include "cmStateDirectory.h" class cmComputeLinkInformation; +class cmGeneratorTarget; class cmOutputConverter; class cmLinkLineComputer @@ -36,6 +37,9 @@ public: virtual std::string ComputeLinkLibraries(cmComputeLinkInformation& cli, std::string const& stdLibString); + virtual std::string GetLinkerLanguage(cmGeneratorTarget* target, + std::string const& config); + protected: std::string ComputeLinkLibs(cmComputeLinkInformation& cli); std::string ComputeRPath(cmComputeLinkInformation& cli); diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index 75e5ef5..6a700ff 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -59,6 +59,12 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries( return fout.str(); } +std::string cmLinkLineDeviceComputer::GetLinkerLanguage(cmGeneratorTarget*, + std::string const&) +{ + return "CUDA"; +} + cmNinjaLinkLineDeviceComputer::cmNinjaLinkLineDeviceComputer( cmOutputConverter* outputConverter, cmStateDirectory stateDir, cmGlobalNinjaGenerator const* gg) diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h index d1079d7..f4bb3eb 100644 --- a/Source/cmLinkLineDeviceComputer.h +++ b/Source/cmLinkLineDeviceComputer.h @@ -17,6 +17,9 @@ public: std::string ComputeLinkLibraries(cmComputeLinkInformation& cli, std::string const& stdLibString) CM_OVERRIDE; + + std::string GetLinkerLanguage(cmGeneratorTarget* target, + std::string const& config) CM_OVERRIDE; }; class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ead1e72..44c390c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -13,6 +13,7 @@ #include "cmInstallScriptGenerator.h" #include "cmInstallTargetGenerator.h" #include "cmLinkLineComputer.h" +#include "cmLinkLineDeviceComputer.h" #include "cmMakefile.h" #include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" @@ -979,7 +980,9 @@ void cmLocalGenerator::GetTargetFlags( linkFlags += this->Makefile->GetSafeDefinition(build); linkFlags += " "; } - std::string linkLanguage = target->GetLinkerLanguage(buildType); + + const std::string linkLanguage = + linkLineComputer->GetLinkerLanguage(target, buildType); if (linkLanguage.empty()) { cmSystemTools::Error( "CMake can not determine linker language for target: ", https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc5051f1c1b7604b9c05e04bdccdff222b69efa0 commit dc5051f1c1b7604b9c05e04bdccdff222b69efa0 Author: Robert Maynard AuthorDate: Thu Jan 5 14:21:23 2017 -0500 Commit: Brad King CommitDate: Thu Jan 12 15:13:31 2017 -0500 CUDA: Test that CUDA flags are used when device linking executables. diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt index 5772fcf..40c9675 100644 --- a/Tests/Cuda/CMakeLists.txt +++ b/Tests/Cuda/CMakeLists.txt @@ -2,3 +2,4 @@ ADD_TEST_MACRO(Cuda.Complex CudaComplex) ADD_TEST_MACRO(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures) ADD_TEST_MACRO(Cuda.ObjectLibrary CudaObjectLibrary) +ADD_TEST_MACRO(Cuda.ProperLinkFlags ProperLinkFlags) diff --git a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt new file mode 100644 index 0000000..a9eb8bd --- /dev/null +++ b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt @@ -0,0 +1,20 @@ + +cmake_minimum_required(VERSION 3.7) +project (ProperLinkFlags CUDA CXX) + +#Goal for this example: +#Verify that when we have CXX and CUDA enabled and we link an executable that +#has CUDA and CXX we use the CUDA link flags when doing the device link +#step + +#Specify a set of valid CUDA flags and an invalid set of CXX flags ( for CUDA ) +#to make sure we don't use the CXX flags when linking CUDA executables +set(CMAKE_CUDA_FLAGS "-arch=sm_35 --use_fast_math") +set(CMAKE_CXX_FLAGS "-Wall") + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CUDA_STANDARD 11) +add_executable(ProperLinkFlags file1.cu main.cxx) + +set_target_properties( ProperLinkFlags + PROPERTIES CUDA_SEPARABLE_COMPILATION ON) diff --git a/Tests/Cuda/ProperLinkFlags/file1.cu b/Tests/Cuda/ProperLinkFlags/file1.cu new file mode 100644 index 0000000..d93dc9f --- /dev/null +++ b/Tests/Cuda/ProperLinkFlags/file1.cu @@ -0,0 +1,11 @@ + +#include "file1.h" + +result_type __device__ file1_func(int x) +{ + __ldg(&x); + result_type r; + r.input = x; + r.sum = x*x; + return r; +} diff --git a/Tests/Cuda/ProperLinkFlags/file1.h b/Tests/Cuda/ProperLinkFlags/file1.h new file mode 100644 index 0000000..ff1945c --- /dev/null +++ b/Tests/Cuda/ProperLinkFlags/file1.h @@ -0,0 +1,7 @@ + +#pragma once +struct result_type +{ + int input; + int sum; +}; diff --git a/Tests/Cuda/ProperLinkFlags/main.cxx b/Tests/Cuda/ProperLinkFlags/main.cxx new file mode 100644 index 0000000..7c0ee9e --- /dev/null +++ b/Tests/Cuda/ProperLinkFlags/main.cxx @@ -0,0 +1,9 @@ + +#include + +#include "file1.h" + +int main(int argc, char** argv) +{ + return 0; +} ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCUDACompiler.cmake.in | 2 ++ Modules/CMakeCUDAInformation.cmake | 2 +- Modules/Platform/Windows-NVIDIA-CUDA.cmake | 2 +- Source/cmLinkLineComputer.cxx | 6 ++++++ Source/cmLinkLineComputer.h | 4 ++++ Source/cmLinkLineDeviceComputer.cxx | 6 ++++++ Source/cmLinkLineDeviceComputer.h | 3 +++ Source/cmLocalGenerator.cxx | 5 ++++- Tests/Cuda/CMakeLists.txt | 1 + Tests/Cuda/ProperLinkFlags/CMakeLists.txt | 20 ++++++++++++++++++++ Tests/Cuda/{Complex => ProperLinkFlags}/file1.cu | 1 + Tests/Cuda/{Complex => ProperLinkFlags}/file1.h | 0 .../main.cpp => Cuda/ProperLinkFlags/main.cxx} | 4 ++++ 13 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 Tests/Cuda/ProperLinkFlags/CMakeLists.txt copy Tests/Cuda/{Complex => ProperLinkFlags}/file1.cu (90%) copy Tests/Cuda/{Complex => ProperLinkFlags}/file1.h (100%) copy Tests/{RunCMake/CompatibleInterface/main.cpp => Cuda/ProperLinkFlags/main.cxx} (54%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Jan 12 15:32:16 2017 From: brad.king at kitware.com (Brad King) Date: Thu, 12 Jan 2017 15:32:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.7.1-2139-ge568e03 Message-ID: <20170112203216.5ADABFA38F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e568e03e024719c1e119fb5e3ee35f491ca1b757 (commit) via 4971799360b5ec7c99f94810f2fa5cb9f80dcebf (commit) from c52c3679f3653ad0e34b35f08b9ccf780f3e5473 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e568e03e024719c1e119fb5e3ee35f491ca1b757 commit e568e03e024719c1e119fb5e3ee35f491ca1b757 Merge: c52c367 4971799 Author: Brad King AuthorDate: Thu Jan 12 15:32:14 2017 -0500 Commit: CMake Topic Stage CommitDate: Thu Jan 12 15:32:14 2017 -0500 Merge topic 'usage-cpack-ifw-configure-file' into next 49717993 QtIFW: Improved packaging https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4971799360b5ec7c99f94810f2fa5cb9f80dcebf commit 4971799360b5ec7c99f94810f2fa5cb9f80dcebf Author: Konstantin Podsvirov AuthorDate: Wed Jan 11 14:06:00 2017 +0300 Commit: Konstantin Podsvirov CommitDate: Thu Jan 12 19:29:52 2017 +0300 QtIFW: Improved packaging Now cpack_ifw_configure_file command used to configure template files of component's scripts. Now for these template files we can use QtIFW predefined variables (like @VAR@) and template variables in Qt/IFW/SDK/Creator templates style (like %VAR%). Now CMake_INSTALL_INFIX advanced variable used to configure CMake installation destination when package as part of QtSDK. diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index ba858bd..a0aacb4 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -54,6 +54,9 @@ if(${CPACK_SYSTEM_NAME} MATCHES Windows) endif() endif() +# Command for configure IFW script templates +include(${CMake_SOURCE_DIR}/Modules/CPackIFWConfigureFile.cmake) + # Advanced IFW configuration set(_cpifwrc CPACK_IFW_COMPONENT_GROUP_CMAKE_) set(_cpifwrcconf _CPACK_IFW_COMPONENT_GROUP_CMAKE) @@ -85,8 +88,6 @@ _cmifwarg("Package tag (values: TRUE, FALSE, SCRIPT)" _cmifwarg("Package tag" STRING VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}") -_cmifwarg("Package