This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via c068236bb9d003c43856dd2bc2052605d4377982 (commit) via 90323ff0513c8291bc36ea9b84a55eeebbf00329 (commit) via 283b8c2ae6234d7f71bfe372c71a80deadf9b39d (commit) via d3b765d4510b73ee17df0e2bee0f7b9a355c5cba (commit) via 98a2d42301ec9ba0cd1c69b0a05351039bc69dc8 (commit) via 3dc81a48ffbf22e044678736996272ef1b8395ff (commit) from 3fff09096ab87914a08499958d956c2be1fdd085 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c068236bb9d003c43856dd2bc2052605d4377982 commit c068236bb9d003c43856dd2bc2052605d4377982 Merge: 90323ff 98a2d42 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Feb 25 12:48:38 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Feb 25 07:51:01 2019 -0500 Merge topic 'link-options' 98a2d42301 PIE link options: No warning when policy CMP0083 is not set. Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2996 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90323ff0513c8291bc36ea9b84a55eeebbf00329 commit 90323ff0513c8291bc36ea9b84a55eeebbf00329 Merge: 283b8c2 d3b765d Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Feb 25 12:48:48 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Feb 25 07:49:53 2019 -0500 Merge topic 'remove-exclude-from-all-warning' d3b765d451 EXCLUDE_FROM_ALL: Don't warn if installing target excluded from all Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3002 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=283b8c2ae6234d7f71bfe372c71a80deadf9b39d commit 283b8c2ae6234d7f71bfe372c71a80deadf9b39d Merge: 3fff090 3dc81a4 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Feb 25 12:48:27 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Feb 25 07:48:35 2019 -0500 Merge topic 'fix-implicit-includes-fortran' 3dc81a48ff Fortran: Do not suppress explicit use of implicit include directories Acked-by: Kitware Robot <kwro...@kitware.com> Acked-by: Michael Hirsch, Ph.D. <mich...@scivision.co> Merge-request: !2994 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3b765d4510b73ee17df0e2bee0f7b9a355c5cba commit d3b765d4510b73ee17df0e2bee0f7b9a355c5cba Author: Craig Scott <craig.sc...@crascit.com> AuthorDate: Thu Feb 21 23:00:50 2019 +1100 Commit: Craig Scott <craig.sc...@crascit.com> CommitDate: Fri Feb 22 07:55:56 2019 +1100 EXCLUDE_FROM_ALL: Don't warn if installing target excluded from all The original warning pre-dates support for install components. There are now legitimate scenarios where an install(TARGETS) command may list a target that is excluded from all, e.g. hierarchical projects that will never install the component such a target belongs to. Fixes: #18938 diff --git a/Help/prop_tgt/EXCLUDE_FROM_ALL.rst b/Help/prop_tgt/EXCLUDE_FROM_ALL.rst index e7457e1..0eee297 100644 --- a/Help/prop_tgt/EXCLUDE_FROM_ALL.rst +++ b/Help/prop_tgt/EXCLUDE_FROM_ALL.rst @@ -6,8 +6,16 @@ Exclude the target from the all target. A property on a target that indicates if the target is excluded from the default build target. If it is not, then with a Makefile for example typing make will cause this target to be built. The same -concept applies to the default build of other generators. Installing -a target with EXCLUDE_FROM_ALL set to true has undefined behavior. +concept applies to the default build of other generators. + +With ``EXCLUDE_FROM_ALL`` set to false or not set at all, the target +will be brought up to date as part of doing a ``make install`` or its +equivalent for the CMake generator being used. If a target has +``EXCLUDE_FROM_ALL`` set to true, then any attempt to install that +target has undefined behavior. Note that such a target can still safely +be listed in an :command:`install(TARGETS)` command as long as the install +components the target belongs to are not part of the set of components +that anything tries to install. This property is enabled by default for targets that are created in directories that have :prop_dir:`EXCLUDE_FROM_ALL` set to ``TRUE``. diff --git a/Help/release/3.14.rst b/Help/release/3.14.rst index 13d209f..02a6974 100644 --- a/Help/release/3.14.rst +++ b/Help/release/3.14.rst @@ -370,3 +370,7 @@ Other Changes :variable:`CPACK_DEBIAN_ARCHIVE_TYPE` variable, because ``dpkg`` has never supported the PAX tar format. The ``paxr`` value will be mapped to ``gnutar`` and a deprecation message emitted. + +* CMake no longer issues a warning if a target listed in an + :command:`install(TARGETS)` command has its :prop_tgt:`EXCLUDE_FROM_ALL` + property set to true. diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 59701a1..9d3a6bb 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -41,22 +41,6 @@ cmInstallTargetGenerator::cmInstallTargetGenerator( cmInstallTargetGenerator::~cmInstallTargetGenerator() = default; -void cmInstallTargetGenerator::GenerateScript(std::ostream& os) -{ - // Warn if installing an exclude-from-all target. - if (this->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { - std::ostringstream msg; - msg << "WARNING: Target \"" << this->Target->GetName() - << "\" has EXCLUDE_FROM_ALL set and will not be built by default " - << "but an install rule has been provided for it. CMake does " - << "not define behavior for this case."; - cmSystemTools::Message(msg.str(), "Warning"); - } - - // Perform the main install script generation. - this->cmInstallGenerator::GenerateScript(os); -} - void cmInstallTargetGenerator::GenerateScriptForConfig( std::ostream& os, const std::string& config, Indent indent) { diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index 715b4ae..6df5b1a 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -69,7 +69,6 @@ public: cmListFileBacktrace const& GetBacktrace() const { return this->Backtrace; } protected: - void GenerateScript(std::ostream& os) override; void GenerateScriptForConfig(std::ostream& os, const std::string& config, Indent indent) override; void GenerateScriptForConfigObjectLibrary(std::ostream& os, diff --git a/Tests/RunCMake/install/TARGETS-OPTIONAL-stderr.txt b/Tests/RunCMake/install/TARGETS-OPTIONAL-stderr.txt deleted file mode 100644 index 86e3ec0..0000000 --- a/Tests/RunCMake/install/TARGETS-OPTIONAL-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -^WARNING: Target "notall" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it\. CMake does not define behavior for this case\.$ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98a2d42301ec9ba0cd1c69b0a05351039bc69dc8 commit 98a2d42301ec9ba0cd1c69b0a05351039bc69dc8 Author: Marc Chevrier <marc.chevr...@gmail.com> AuthorDate: Wed Feb 20 16:54:47 2019 +0100 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Feb 20 14:30:57 2019 -0500 PIE link options: No warning when policy CMP0083 is not set. Fixes: #18955 diff --git a/Help/policy/CMP0083.rst b/Help/policy/CMP0083.rst index b26d6c8..32acf1f 100644 --- a/Help/policy/CMP0083.rst +++ b/Help/policy/CMP0083.rst @@ -23,9 +23,10 @@ which it is used, it is the project's responsibility to use the :prop_tgt:`POSITION_INDEPENDENT_CODE` target property for executables will be honored at link time. -This policy was introduced in CMake version 3.14. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +This policy was introduced in CMake version 3.14. Use the +:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +Unlike most policies, CMake version |release| does not warn when this policy is +not set and simply uses ``OLD`` behavior. .. include:: DEPRECATED.txt diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 78040c3..25349d4 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -510,21 +510,10 @@ const char* cmGeneratorTarget::GetLinkPIEProperty( return nullptr; } - switch (this->GetPolicyStatusCMP0083()) { - case cmPolicies::WARN: { - std::ostringstream e; - e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0083); - this->LocalGenerator->IssueMessage(MessageType::AUTHOR_WARNING, e.str()); - CM_FALLTHROUGH; - } - case cmPolicies::OLD: - return nullptr; - default: - // nothing to do - break; - } - - return PICValue.c_str(); + auto status = this->GetPolicyStatusCMP0083(); + return (status != cmPolicies::WARN && status != cmPolicies::OLD) + ? PICValue.c_str() + : nullptr; } bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dc81a48ffbf22e044678736996272ef1b8395ff commit 3dc81a48ffbf22e044678736996272ef1b8395ff Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Feb 20 08:13:01 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Feb 20 08:13:57 2019 -0500 Fortran: Do not suppress explicit use of implicit include directories Since commit 2e91627dea (ParseImplicitIncludeInfo: add Fortran implicit include handling, 2019-01-25, v3.14.0-rc1~73^2) we actually populate `CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES` for the first time. This value may be useful to project code to pass to other tooling that wants to preprocess the way Fortran does, so we should compute the value. However, compilers like `gfortran` do not actually search their own implicit include directories for `.mod` files. The directories must be passed via `-I` in order for `.mod` files in them to be found. Since Fortran has no standard library header files that we need to avoid overriding, it is safe to *not* filter out implicit include directories from those passed explicitly via `-I` options. Skip this filtering so that include directories specified by project code to find `.mod` files will be searched by the compiler even if they happen to be implicitly searched by the preprocessor. Fixes: #18914 diff --git a/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst b/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst index cc80851..e361fd9 100644 --- a/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst +++ b/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst @@ -6,4 +6,9 @@ Directories implicitly searched by the compiler for header files. CMake does not explicitly specify these directories on compiler command lines for language ``<LANG>``. This prevents system include directories from being treated as user include directories on some -compilers. +compilers, which is important for ``C``, ``CXX``, and ``CUDA`` to +avoid overriding standard library headers. + +This value is not used for ``Fortran`` because it has no standard +library headers and some compilers do not search their implicit +include directories for module ``.mod`` files. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8b01af1..7e56818 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -947,15 +947,21 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( std::vector<std::string> impDirVec = userStandardDirs; // Load implicit include directories for this language. - std::string key = "CMAKE_"; - key += lang; - key += "_IMPLICIT_INCLUDE_DIRECTORIES"; - if (const char* value = this->Makefile->GetDefinition(key)) { - size_t const impDirVecOldSize = impDirVec.size(); - cmSystemTools::ExpandListArgument(value, impDirVec); - // FIXME: Use cmRange with 'advance()' when it supports non-const. - for (size_t i = impDirVecOldSize; i < impDirVec.size(); ++i) { - cmSystemTools::ConvertToUnixSlashes(impDirVec[i]); + // We ignore this for Fortran because: + // * There are no standard library headers to avoid overriding. + // * Compilers like gfortran do not search their own implicit include + // directories for modules ('.mod' files). + if (lang != "Fortran") { + std::string key = "CMAKE_"; + key += lang; + key += "_IMPLICIT_INCLUDE_DIRECTORIES"; + if (const char* value = this->Makefile->GetDefinition(key)) { + size_t const impDirVecOldSize = impDirVec.size(); + cmSystemTools::ExpandListArgument(value, impDirVec); + // FIXME: Use cmRange with 'advance()' when it supports non-const. + for (size_t i = impDirVecOldSize; i < impDirVec.size(); ++i) { + cmSystemTools::ConvertToUnixSlashes(impDirVec[i]); + } } } ----------------------------------------------------------------------- Summary of changes: Help/policy/CMP0083.rst | 7 ++++--- Help/prop_tgt/EXCLUDE_FROM_ALL.rst | 12 +++++++++-- Help/release/3.14.rst | 4 ++++ .../CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst | 7 ++++++- Source/cmGeneratorTarget.cxx | 19 ++++------------- Source/cmInstallTargetGenerator.cxx | 16 --------------- Source/cmInstallTargetGenerator.h | 1 - Source/cmLocalGenerator.cxx | 24 ++++++++++++++-------- Tests/RunCMake/install/TARGETS-OPTIONAL-stderr.txt | 1 - 9 files changed, 43 insertions(+), 48 deletions(-) delete mode 100644 Tests/RunCMake/install/TARGETS-OPTIONAL-stderr.txt hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits