summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:11 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:11 +0900
commitba608e51abaeeca867d14590749beda6c283e3a8 (patch)
tree8f7ed2bc0008a4a33854eb92ff2347d1697f2834
parent5b13f2e6aa1ca2f812f53a40b11ff1f80277f897 (diff)
downloadcmake-ba608e51abaeeca867d14590749beda6c283e3a8.tar.gz
cmake-ba608e51abaeeca867d14590749beda6c283e3a8.tar.bz2
cmake-ba608e51abaeeca867d14590749beda6c283e3a8.zip
Imported Upstream version 3.10.2upstream/3.10.2
-rw-r--r--Modules/FindPostgreSQL.cmake4
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGraphVizWriter.cxx41
-rw-r--r--Source/cmGraphVizWriter.h1
-rw-r--r--Source/cmQtAutoGen.cxx2
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx22
-rw-r--r--Source/cmQtAutoGenerators.cxx3
-rw-r--r--Utilities/KWIML/include/kwiml/abi.h2
8 files changed, 52 insertions, 25 deletions
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 9e2194ce4..f745876ec 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -27,7 +27,7 @@
# In Windows the default installation of PostgreSQL uses that as part of the path.
# E.g C:\Program Files\PostgreSQL\8.4.
# Currently, the following version numbers are known to this module:
-# "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
+# "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
#
# To use this variable just do something like this:
# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4")
@@ -71,7 +71,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher
set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
- "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
+ "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
# Define additional search paths for root directories.
set( PostgreSQL_ROOT_DIRECTORIES
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 57fe0b185..c262bddee 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 10)
-set(CMake_VERSION_PATCH 1)
+set(CMake_VERSION_PATCH 2)
#set(CMake_VERSION_RC 0)
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index dd2993d70..e684f5ec2 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -29,6 +29,22 @@ enum LinkLibraryScopeType
const char* const GRAPHVIZ_PRIVATE_EDEGE_STYLE = "dashed";
const char* const GRAPHVIZ_INTERFACE_EDEGE_STYLE = "dotted";
+std::string getLinkLibraryStyle(const LinkLibraryScopeType& type)
+{
+ std::string style;
+ switch (type) {
+ case LLT_SCOPE_PRIVATE:
+ style = "[style = " + std::string(GRAPHVIZ_PRIVATE_EDEGE_STYLE) + "]";
+ break;
+ case LLT_SCOPE_INTERFACE:
+ style = "[style = " + std::string(GRAPHVIZ_INTERFACE_EDEGE_STYLE) + "]";
+ break;
+ default:
+ break;
+ }
+ return style;
+}
+
const char* getShapeForTarget(const cmGeneratorTarget* target)
{
if (!target) {
@@ -132,6 +148,7 @@ cmGraphVizWriter::cmGraphVizWriter(
, GenerateForStaticLibs(true)
, GenerateForSharedLibs(true)
, GenerateForModuleLibs(true)
+ , GenerateForInterface(true)
, GenerateForExternals(true)
, GeneratePerTarget(true)
, GenerateDependers(true)
@@ -192,6 +209,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
__set_bool_if_set(this->GenerateForStaticLibs, "GRAPHVIZ_STATIC_LIBS");
__set_bool_if_set(this->GenerateForSharedLibs, "GRAPHVIZ_SHARED_LIBS");
__set_bool_if_set(this->GenerateForModuleLibs, "GRAPHVIZ_MODULE_LIBS");
+ __set_bool_if_set(this->GenerateForInterface, "GRAPHVIZ_INTERFACE");
__set_bool_if_set(this->GenerateForExternals, "GRAPHVIZ_EXTERNAL_LIBS");
__set_bool_if_set(this->GeneratePerTarget, "GRAPHVIZ_GENERATE_PER_TARGET");
__set_bool_if_set(this->GenerateDependers, "GRAPHVIZ_GENERATE_DEPENDERS");
@@ -379,16 +397,7 @@ void cmGraphVizWriter::WriteConnections(
str << " \"" << myNodeName << "\" -> \"" << libNameIt->second << "\"";
- switch (llit.second) {
- case LLT_SCOPE_PRIVATE:
- str << "[style = " << GRAPHVIZ_PRIVATE_EDEGE_STYLE << "]";
- break;
- case LLT_SCOPE_INTERFACE:
- str << "[style = " << GRAPHVIZ_INTERFACE_EDEGE_STYLE << "]";
- break;
- default:
- break;
- }
+ str << getLinkLibraryStyle(llit.second);
str << " // " << targetName << " -> " << libName << std::endl;
this->WriteConnections(libName, insertedNodes, insertedConnections, str);
@@ -429,12 +438,11 @@ void cmGraphVizWriter::WriteDependerConnections(
// Now we have a target, check whether it links against targetName.
// If so, draw a connection, and then continue with dependers on that one.
- const cmTarget::LinkLibraryVectorType* ll =
- &(tptr.second->Target->GetOriginalLinkLibraries());
+ std::map<std::string, LinkLibraryScopeType> ll =
+ getScopedLinkLibrariesFromTarget(tptr.second->Target);
- for (auto const& llit : *ll) {
- std::string libName = llit.first;
- if (libName == targetName) {
+ for (auto const& llit : ll) {
+ if (llit.first == targetName) {
// So this target links against targetName.
std::map<std::string, std::string>::const_iterator dependerNodeNameIt =
this->TargetNamesNodes.find(tptr.first);
@@ -452,6 +460,7 @@ void cmGraphVizWriter::WriteDependerConnections(
str << " \"" << dependerNodeNameIt->second << "\" -> \""
<< myNodeName << "\"";
str << " // " << targetName << " -> " << tptr.first << std::endl;
+ str << getLinkLibraryStyle(llit.second);
this->WriteDependerConnections(tptr.first, insertedNodes,
insertedConnections, str);
}
@@ -572,6 +581,8 @@ bool cmGraphVizWriter::GenerateForTargetType(
return this->GenerateForSharedLibs;
case cmStateEnums::MODULE_LIBRARY:
return this->GenerateForModuleLibs;
+ case cmStateEnums::INTERFACE_LIBRARY:
+ return this->GenerateForInterface;
default:
break;
}
diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h
index 824999b96..ac20da963 100644
--- a/Source/cmGraphVizWriter.h
+++ b/Source/cmGraphVizWriter.h
@@ -79,6 +79,7 @@ protected:
bool GenerateForStaticLibs;
bool GenerateForSharedLibs;
bool GenerateForModuleLibs;
+ bool GenerateForInterface;
bool GenerateForExternals;
bool GeneratePerTarget;
bool GenerateDependers;
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 5e89978b9..0fc2fc012 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -248,7 +248,7 @@ static bool RccListInputsQt5(std::string const& rccCommand,
// - Class definitions
-std::string const cmQtAutoGen::listSep = "@LSEP@";
+std::string const cmQtAutoGen::listSep = "<<<S>>>";
std::string const& cmQtAutoGen::GeneratorName(Generator type)
{
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index b02d872a4..89568c387 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -361,11 +361,16 @@ static void SetupAcquireSkipFiles(cmQtAutoGenDigest const& digest,
{
// Read skip files from makefile sources
{
- const std::vector<cmSourceFile*>& allSources =
- digest.Target->Makefile->GetSourceFiles();
- for (cmSourceFile* sf : allSources) {
+ std::string pathError;
+ for (cmSourceFile* sf : digest.Target->Makefile->GetSourceFiles()) {
// sf->GetExtension() is only valid after sf->GetFullPath() ...
- std::string const& fPath = sf->GetFullPath();
+ // Since we're iterating over source files that might be not in the
+ // target we need to check for path errors (not existing files).
+ std::string const& fPath = sf->GetFullPath(&pathError);
+ if (!pathError.empty()) {
+ pathError.clear();
+ continue;
+ }
cmSystemTools::FileFormat const fileType =
cmSystemTools::GetFileFormat(sf->GetExtension().c_str());
if (!(fileType == cmSystemTools::CXX_FILE_FORMAT) &&
@@ -540,9 +545,16 @@ static void SetupAutoTargetUic(cmQtAutoGenDigest const& digest,
std::vector<std::vector<std::string>> uiFileOptions;
{
std::string const uiExt = "ui";
+ std::string pathError;
for (cmSourceFile* sf : makefile->GetSourceFiles()) {
// sf->GetExtension() is only valid after sf->GetFullPath() ...
- std::string const& fPath = sf->GetFullPath();
+ // Since we're iterating over source files that might be not in the
+ // target we need to check for path errors (not existing files).
+ std::string const& fPath = sf->GetFullPath(&pathError);
+ if (!pathError.empty()) {
+ pathError.clear();
+ continue;
+ }
if (sf->GetExtension() == uiExt) {
std::string const absFile = cmSystemTools::GetRealPath(fPath);
// Check if the file should be skipped
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index b329d3828..a9c9b9d36 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -171,6 +171,9 @@ bool cmQtAutoGenerators::Run(std::string const& targetDirectory,
snapshot.GetDirectory().SetCurrentSource(targetDirectory);
auto makefile = cm::make_unique<cmMakefile>(&gg, snapshot);
+ // The OLD/WARN behavior for policy CMP0053 caused a speed regression.
+ // https://gitlab.kitware.com/cmake/cmake/issues/17570
+ makefile->SetPolicyVersion("3.9");
gg.SetCurrentMakefile(makefile.get());
bool success = false;
diff --git a/Utilities/KWIML/include/kwiml/abi.h b/Utilities/KWIML/include/kwiml/abi.h
index 5ffd542cf..ce8a896ca 100644
--- a/Utilities/KWIML/include/kwiml/abi.h
+++ b/Utilities/KWIML/include/kwiml/abi.h
@@ -468,7 +468,7 @@ suppression macro KWIML_ABI_NO_VERIFY was defined.
# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE
/* RISC-V */
-#elif defined(__riscv__)
+#elif defined(__riscv) || defined(__riscv__)
# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE
/* Unknown CPU */