summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/cmLoadCommandCommand.cxx4
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx2
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.cxx5
-rw-r--r--Source/cmQtAutoMocUic.cxx11
-rw-r--r--Source/cmStandardLexer.h5
-rw-r--r--Source/cmSystemTools.cxx5
-rw-r--r--Source/cmTimestamp.cxx5
-rw-r--r--Source/cmake.cxx6
9 files changed, 26 insertions, 21 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 948452a8f..725b08ee5 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 20)
-set(CMake_VERSION_PATCH 1)
+set(CMake_VERSION_PATCH 2)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
@@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
- set(git_info [==[9765ccfa71 CMake 3.20.1]==])
+ set(git_info [==[1ad4501ae9 CMake 3.20.2]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 5a7b30f19..2981ef877 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -1,12 +1,12 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#if !defined(_WIN32) && !defined(__sun)
+#if !defined(_WIN32) && !defined(__sun) && !defined(__OpenBSD__)
// POSIX APIs are needed
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _POSIX_C_SOURCE 200809L
#endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
// For isascii
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index a18ca20d5..92c5b521b 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -173,7 +173,7 @@ void cmNinjaUtilityTargetGenerator::WriteUtilBuildStatements(
std::string ccConfig;
if (genTarget->Target->IsPerConfig() &&
genTarget->GetType() != cmStateEnums::GLOBAL_TARGET) {
- ccConfig = fileConfig;
+ ccConfig = config;
}
if (config == fileConfig ||
gg->GetPerConfigUtilityTargets().count(genTarget->GetName())) {
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx
index f79ffd4a0..f8d18f27a 100644
--- a/Source/cmQtAutoGenGlobalInitializer.cxx
+++ b/Source/cmQtAutoGenGlobalInitializer.cxx
@@ -97,6 +97,11 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
}
std::set<std::string> const& languages =
target->GetAllConfigCompileLanguages();
+ // cmGeneratorTarget::GetAllConfigCompileLanguages caches the target's
+ // sources. Clear it so that OBJECT library targets that are AUTOGEN
+ // initialized after this target get their added mocs_compilation.cpp
+ // source acknowledged by this target.
+ target->ClearSourcesCache();
if (languages.count("CSharp")) {
// Don't process target if it's a CSharp target
continue;
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 535f786f4..f5831628d 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -564,8 +564,7 @@ private:
// -- Generation
bool CreateDirectories();
// -- Support for depfiles
- static std::vector<std::string> dependenciesFromDepFile(
- const char* filePath);
+ std::vector<std::string> dependenciesFromDepFile(const char* filePath);
// -- Settings
BaseSettingsT BaseConst_;
@@ -2066,7 +2065,8 @@ void cmQtAutoMocUicT::JobCompileMocT::Process()
" does not exist.");
return;
}
- this->CacheEntry->Moc.Depends = dependenciesFromDepFile(depfile.c_str());
+ this->CacheEntry->Moc.Depends =
+ this->Gen()->dependenciesFromDepFile(depfile.c_str());
}
}
@@ -2223,12 +2223,12 @@ void cmQtAutoMocUicT::JobDepFilesMergeT::Process()
this->MessagePath(this->BaseConst().DepFile.c_str())));
}
auto processDepFile =
- [](const std::string& mocOutputFile) -> std::vector<std::string> {
+ [this](const std::string& mocOutputFile) -> std::vector<std::string> {
std::string f = mocOutputFile + ".d";
if (!cmSystemTools::FileExists(f)) {
return {};
}
- return dependenciesFromDepFile(f.c_str());
+ return this->Gen()->dependenciesFromDepFile(f.c_str());
};
std::vector<std::string> dependencies = this->initialDependencies();
@@ -2961,6 +2961,7 @@ bool cmQtAutoMocUicT::CreateDirectories()
std::vector<std::string> cmQtAutoMocUicT::dependenciesFromDepFile(
const char* filePath)
{
+ std::lock_guard<std::mutex> guard(this->CMakeLibMutex_);
auto const content = cmReadGccDepfile(filePath);
if (!content || content->empty()) {
return {};
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h
index 1da8c9844..b871f5fca 100644
--- a/Source/cmStandardLexer.h
+++ b/Source/cmStandardLexer.h
@@ -7,7 +7,8 @@
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 600
#endif
-#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)
+#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun) && \
+ !defined(__OpenBSD__)
/* POSIX APIs are needed */
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _POSIX_C_SOURCE 200809L
@@ -17,7 +18,7 @@
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 600
#endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
/* For isascii */
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 080759077..c1ce7ec98 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1,13 +1,12 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#if !defined(_WIN32) && !defined(__sun)
+#if !defined(_WIN32) && !defined(__sun) && !defined(__OpenBSD__)
// POSIX APIs are needed
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _POSIX_C_SOURCE 200809L
#endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
- defined(__QNX__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__QNX__)
// For isascii
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index b01653009..056696d4b 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -1,13 +1,12 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#if !defined(_WIN32) && !defined(__sun)
+#if !defined(_WIN32) && !defined(__sun) && !defined(__OpenBSD__)
// POSIX APIs are needed
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _POSIX_C_SOURCE 200809L
#endif
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
- defined(__QNX__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__QNX__)
// For isascii
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 4b5739572..4d0382116 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3210,8 +3210,8 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
}
auto gen = this->CreateGlobalGenerator(*cachedGenerator);
if (!gen) {
- std::cerr << "Error: could create CMAKE_GENERATOR \"" << *cachedGenerator
- << "\"\n";
+ std::cerr << "Error: could not create CMAKE_GENERATOR \""
+ << *cachedGenerator << "\"\n";
return 1;
}
this->SetGlobalGenerator(std::move(gen));
@@ -3350,7 +3350,7 @@ bool cmake::Open(const std::string& dir, bool dryRun)
std::unique_ptr<cmGlobalGenerator> gen =
this->CreateGlobalGenerator(fullName);
if (!gen) {
- std::cerr << "Error: could create CMAKE_GENERATOR \"" << fullName
+ std::cerr << "Error: could not create CMAKE_GENERATOR \"" << fullName
<< "\"\n";
return false;
}