This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via ea048ed66c488a57ff1fe4477e07b489bf235972 (commit) via b903092b31389e21ff74dfccd4cbd7d9deeb7c22 (commit) via 0e436c573c52add744f0ff7c8845be9c7ff381a0 (commit) via 89ff3ee779f54e982e96b21b7d370371e639cc6f (commit) from 095fc6d9d96bf9f12770f85ebf0b75d384a7d5fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea048ed66c488a57ff1fe4477e07b489bf235972 commit ea048ed66c488a57ff1fe4477e07b489bf235972 Merge: b903092b31 0e436c573c Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Oct 17 17:51:33 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Oct 17 13:52:00 2019 -0400 Merge topic 'export-target-lang-name' 0e436c573c install,export: Do not treat language names as target names Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3927 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b903092b31389e21ff74dfccd4cbd7d9deeb7c22 commit b903092b31389e21ff74dfccd4cbd7d9deeb7c22 Merge: 095fc6d9d9 89ff3ee779 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Oct 17 17:51:00 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Oct 17 13:51:11 2019 -0400 Merge topic 'vs_dotnet_documentation_file' 89ff3ee779 VS: Add VS_DOTNET_DOCUMENTATION_FILE property Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3879 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e436c573c52add744f0ff7c8845be9c7ff381a0 commit 0e436c573c52add744f0ff7c8845be9c7ff381a0 Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Oct 16 12:03:41 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Wed Oct 16 12:48:20 2019 -0400 install,export: Do not treat language names as target names When generating `IMPORTED_LINK_INTERFACE_LANGUAGES`, do not treat the entries as target names. Fixes: #19846 diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 3d7eccc315..aeef602bf6 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -752,9 +752,9 @@ void cmExportFileGenerator::SetImportLinkInterface( if (iface->ImplementationIsInterface) { // Policy CMP0022 must not be NEW. - this->SetImportLinkProperty(suffix, target, - "IMPORTED_LINK_INTERFACE_LIBRARIES", - iface->Libraries, properties, missingTargets); + this->SetImportLinkProperty( + suffix, target, "IMPORTED_LINK_INTERFACE_LIBRARIES", iface->Libraries, + properties, missingTargets, ImportLinkPropertyTargetNames::Yes); return; } @@ -832,14 +832,14 @@ void cmExportFileGenerator::SetImportDetailProperties( // Add the transitive link dependencies for this configuration. if (cmLinkInterface const* iface = target->GetLinkInterface(config, target)) { - this->SetImportLinkProperty(suffix, target, - "IMPORTED_LINK_INTERFACE_LANGUAGES", - iface->Languages, properties, missingTargets); + this->SetImportLinkProperty( + suffix, target, "IMPORTED_LINK_INTERFACE_LANGUAGES", iface->Languages, + properties, missingTargets, ImportLinkPropertyTargetNames::No); std::vector<std::string> dummy; - this->SetImportLinkProperty(suffix, target, - "IMPORTED_LINK_DEPENDENT_LIBRARIES", - iface->SharedDeps, properties, dummy); + this->SetImportLinkProperty( + suffix, target, "IMPORTED_LINK_DEPENDENT_LIBRARIES", iface->SharedDeps, + properties, dummy, ImportLinkPropertyTargetNames::Yes); if (iface->Multiplicity > 0) { std::string prop = cmStrCat("IMPORTED_LINK_INTERFACE_MULTIPLICITY", suffix); @@ -880,7 +880,8 @@ template <typename T> void cmExportFileGenerator::SetImportLinkProperty( std::string const& suffix, cmGeneratorTarget* target, const std::string& propName, std::vector<T> const& entries, - ImportPropertyMap& properties, std::vector<std::string>& missingTargets) + ImportPropertyMap& properties, std::vector<std::string>& missingTargets, + ImportLinkPropertyTargetNames targetNames) { // Skip the property if there are no entries. if (entries.empty()) { @@ -895,9 +896,13 @@ void cmExportFileGenerator::SetImportLinkProperty( link_entries += sep; sep = ";"; - std::string temp = asString(l); - this->AddTargetNamespace(temp, target, missingTargets); - link_entries += temp; + if (targetNames == ImportLinkPropertyTargetNames::Yes) { + std::string temp = asString(l); + this->AddTargetNamespace(temp, target, missingTargets); + link_entries += temp; + } else { + link_entries += asString(l); + } } // Store the property. diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index b04a31eba1..0d69779f9a 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -102,13 +102,19 @@ protected: ImportPropertyMap& properties, std::vector<std::string>& missingTargets); + enum class ImportLinkPropertyTargetNames + { + Yes, + No, + }; template <typename T> void SetImportLinkProperty(std::string const& suffix, cmGeneratorTarget* target, const std::string& propName, std::vector<T> const& entries, ImportPropertyMap& properties, - std::vector<std::string>& missingTargets); + std::vector<std::string>& missingTargets, + ImportLinkPropertyTargetNames targetNames); /** Each subclass knows how to generate its kind of export file. */ virtual bool GenerateMainFile(std::ostream& os) = 0; diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 5cf04e8d89..9d8a248524 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -645,3 +645,8 @@ if(CMAKE_GENERATOR MATCHES "Make|Ninja") EXPORT RequiredExp DESTINATION lib) export(TARGETS testLinkDepends NAMESPACE bld_ APPEND FILE ExportBuildTree.cmake) endif() + +# Test the presence of targets named the same as languages. +# IMPORTED_LINK_INTERFACE_LANGUAGES entries should not be targets. +add_library(C INTERFACE) +add_library(CXX INTERFACE) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89ff3ee779f54e982e96b21b7d370371e639cc6f commit 89ff3ee779f54e982e96b21b7d370371e639cc6f Author: Charly Mourglia <charly.mourg...@diginext.fr> AuthorDate: Wed Oct 2 21:06:58 2019 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Oct 15 11:44:55 2019 -0400 VS: Add VS_DOTNET_DOCUMENTATION_FILE property Add a `VS_DOTNET_DOCUMENTATION_FILE` target property to tell VS generators to add a `DocumentationFile` setting in `.csproj` files. Fixes: #19784 diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 1369aa3706..02e07eb7b0 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -342,6 +342,7 @@ Properties on Targets /prop_tgt/VS_DOTNET_REFERENCES /prop_tgt/VS_DOTNET_REFERENCES_COPY_LOCAL /prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION + /prop_tgt/VS_DOTNET_DOCUMENTATION_FILE /prop_tgt/VS_DPI_AWARE /prop_tgt/VS_GLOBAL_KEYWORD /prop_tgt/VS_GLOBAL_PROJECT_TYPES diff --git a/Help/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE.rst b/Help/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE.rst new file mode 100644 index 0000000000..1bc361c3da --- /dev/null +++ b/Help/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE.rst @@ -0,0 +1,6 @@ +VS_DOTNET_DOCUMENTATION_FILE +---------------------------- + +Visual Studio managed project .NET documentation output + +Sets the target XML documentation file output. diff --git a/Help/release/dev/vs_dotnet_documentation_file.rst b/Help/release/dev/vs_dotnet_documentation_file.rst new file mode 100644 index 0000000000..fdffb1cfcc --- /dev/null +++ b/Help/release/dev/vs_dotnet_documentation_file.rst @@ -0,0 +1,6 @@ +vs_dotnet_documentation_file +---------------------------- + +* The :prop_tgt:`VS_DOTNET_DOCUMENTATION_FILE` target property was added + to tell :ref:`Visual Studio Generators` to generate a ``DocumentationFile`` + reference in ``.csproj`` files. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 3843bf24c4..ca24a0f06d 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -676,6 +676,8 @@ void cmVisualStudio10TargetGenerator::Generate() this->WritePlatformExtensions(e1); } + + this->WriteDotNetDocumentationFile(e0); Elem(e0, "PropertyGroup").Attribute("Label", "UserMacros"); this->WriteWinRTPackageCertificateKeyFile(e0); this->WritePathAndIncrementalLinkOptions(e0); @@ -910,6 +912,18 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReferenceCustomTags( } } +void cmVisualStudio10TargetGenerator::WriteDotNetDocumentationFile(Elem& e0) +{ + std::string const documentationFile = + this->GeneratorTarget->GetSafeProperty("VS_DOTNET_DOCUMENTATION_FILE"); + + if (this->ProjectType == csproj && !documentationFile.empty()) { + Elem e1(e0, "PropertyGroup"); + Elem e2(e1, "DocumentationFile"); + e2.Content(documentationFile); + } +} + void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup(Elem& e0) { std::vector<cmSourceFile const*> resxObjs; diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index a18a33dd89..0835cde9f7 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -79,6 +79,7 @@ private: void WriteDotNetReference(Elem& e1, std::string const& ref, std::string const& hint, std::string const& config); + void WriteDotNetDocumentationFile(Elem& e0); void WriteImports(Elem& e0); void WriteDotNetReferenceCustomTags(Elem& e2, std::string const& ref); void WriteEmbeddedResourceGroup(Elem& e0); diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index 44ccd6b585..ebc4d1c9c5 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -15,6 +15,7 @@ run_cmake(VsDebuggerCommand) run_cmake(VsDebuggerCommandArguments) run_cmake(VsDebuggerEnvironment) run_cmake(VsCSharpCustomTags) +run_cmake(VsCSharpDocumentationFile) run_cmake(VsCSharpReferenceProps) run_cmake(VsCSharpWithoutSources) run_cmake(VsCSharpDeployFiles) diff --git a/Tests/RunCMake/VS10Project/VsCSharpDocumentationFile-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpDocumentationFile-check.cmake new file mode 100644 index 0000000000..0393362d62 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpDocumentationFile-check.cmake @@ -0,0 +1,26 @@ +# +# Check C# VS project for required elements +# +set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj") +if(NOT EXISTS "${csProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.") + return() +endif() + +file(STRINGS "${csProjectFile}" lines) + +set(HAVE_DocumentationFile 0) +foreach(line IN LISTS lines) + if(line MATCHES "^ *<DocumentationFile>([^<>]+)</DocumentationFile>") + if(HAVE_DocumentationFile) + set(RunCMake_TEST_FAILED "Documentation node has been generated more than once for\n ${csProjectFile}") + return() + endif() + set(HAVE_DocumentationFile 1) + endif() +endforeach() + +if(NOT HAVE_DocumentationFile) + set(RunCMake_TEST_FAILED "Documentation node has not been generated for\n ${csProjectFile}") + return() +endif() diff --git a/Tests/RunCMake/VS10Project/VsCSharpDocumentationFile.cmake b/Tests/RunCMake/VS10Project/VsCSharpDocumentationFile.cmake new file mode 100644 index 0000000000..83b6b97065 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpDocumentationFile.cmake @@ -0,0 +1,8 @@ +set(CMAKE_CONFIGURATION_TYPES Debug) +enable_language(CSharp) + +add_library(foo SHARED + foo.cs) + +set_target_properties(foo PROPERTIES + VS_DOTNET_DOCUMENTATION_FILE foo.xml) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE.rst | 6 +++++ Help/release/dev/vs_dotnet_documentation_file.rst | 6 +++++ Source/cmExportFileGenerator.cxx | 31 +++++++++++++--------- Source/cmExportFileGenerator.h | 8 +++++- Source/cmVisualStudio10TargetGenerator.cxx | 14 ++++++++++ Source/cmVisualStudio10TargetGenerator.h | 1 + Tests/ExportImport/Export/CMakeLists.txt | 5 ++++ Tests/RunCMake/VS10Project/RunCMakeTest.cmake | 1 + .../VsCSharpDocumentationFile-check.cmake | 26 ++++++++++++++++++ .../VS10Project/VsCSharpDocumentationFile.cmake | 8 ++++++ 11 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 Help/prop_tgt/VS_DOTNET_DOCUMENTATION_FILE.rst create mode 100644 Help/release/dev/vs_dotnet_documentation_file.rst create mode 100644 Tests/RunCMake/VS10Project/VsCSharpDocumentationFile-check.cmake create mode 100644 Tests/RunCMake/VS10Project/VsCSharpDocumentationFile.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits