[Cmake-commits] CMake branch, master, updated. v3.10.0-531-gd06b826
Kitware Robot
kwrobot at kitware.com
Tue Dec 5 08:25:04 EST 2017
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 d06b8264212c893b5da8d7499328eb403aaaad37 (commit)
via 83068cb1edb3258af9315b5e73e674717a829531 (commit)
via 729dda542010ed584d08630d2e5ab1ff3129e5e8 (commit)
via 2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6 (commit)
via c89e8522bbe0d5526b2d2e6751511fe9737b37e8 (commit)
via 6bffc13ef1c85ec565273d25e811fd6c326533f0 (commit)
via 3519c8f2473c40fd6d2ce86e29742ef30b7e11f1 (commit)
from 0236e5080229e5ce05c43077a56dc5b58fc644fd (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=d06b8264212c893b5da8d7499328eb403aaaad37
commit d06b8264212c893b5da8d7499328eb403aaaad37
Merge: 83068cb 3519c8f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 5 13:18:06 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Dec 5 08:18:13 2017 -0500
Merge topic 'update-cm-thread'
3519c8f2 utilities: Swapped to use std C++11 mutex/threading constructs
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1551
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83068cb1edb3258af9315b5e73e674717a829531
commit 83068cb1edb3258af9315b5e73e674717a829531
Merge: 729dda5 2c06e9e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 5 13:17:24 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Dec 5 08:17:30 2017 -0500
Merge topic 'include_external_ms_project_support_non_windows_target'
2c06e9e7 include_external_msproject: Support non-Windows target platforms
c89e8522 cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1525
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=729dda542010ed584d08630d2e5ab1ff3129e5e8
commit 729dda542010ed584d08630d2e5ab1ff3129e5e8
Merge: 0236e50 6bffc13
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 5 13:15:36 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Dec 5 08:15:40 2017 -0500
Merge topic 'src-genex-refactoring'
6bffc13e Refactor per-source generator expression evaluation
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1550
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6
commit 2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6
Author: Tomoki Imai <Tomoki.Imai at sony.com>
AuthorDate: Sun Nov 26 20:29:03 2017 +0900
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 4 11:23:38 2017 -0500
include_external_msproject: Support non-Windows target platforms
Allow the command on any generator that supports it, even if
the target platform does not define `WIN32`.
Fixes: #17511
diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx
index bd16b1d..85e8cd3 100644
--- a/Source/cmIncludeExternalMSProjectCommand.cxx
+++ b/Source/cmIncludeExternalMSProjectCommand.cxx
@@ -3,6 +3,7 @@
#include "cmIncludeExternalMSProjectCommand.h"
#ifdef _WIN32
+#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
@@ -22,7 +23,9 @@ bool cmIncludeExternalMSProjectCommand::InitialPass(
}
// only compile this for win32 to avoid coverage errors
#ifdef _WIN32
- if (this->Makefile->GetDefinition("WIN32")) {
+ if (this->Makefile->GetDefinition("WIN32") ||
+ this->Makefile->GetGlobalGenerator()
+ ->IsIncludeExternalMSProjectSupported()) {
enum Doing
{
DoingNone,
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c89e8522bbe0d5526b2d2e6751511fe9737b37e8
commit c89e8522bbe0d5526b2d2e6751511fe9737b37e8
Author: Tomoki Imai <Tomoki.Imai at sony.com>
AuthorDate: Sat Dec 2 20:54:55 2017 +0900
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 4 11:21:43 2017 -0500
cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 8fcb533..abc451a 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -358,6 +358,10 @@ public:
virtual bool IsIPOSupported() const { return false; }
+ /** Return whether the generator can import external visual studio project
+ using INCLUDE_EXTERNAL_MSPROJECT */
+ virtual bool IsIncludeExternalMSProjectSupported() const { return false; }
+
/** Return whether the generator should use EFFECTIVE_PLATFORM_NAME. This is
relevant for mixed macOS and iOS builds. */
virtual bool UseEffectivePlatformName(cmMakefile*) const { return false; }
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 55a6813..f4fc3cf 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -101,6 +101,8 @@ public:
/** Return true if building for Windows CE */
virtual bool TargetsWindowsCE() const { return false; }
+ bool IsIncludeExternalMSProjectSupported() const override { return true; }
+
class TargetSet : public std::set<cmGeneratorTarget const*>
{
};
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bffc13ef1c85ec565273d25e811fd6c326533f0
commit 6bffc13ef1c85ec565273d25e811fd6c326533f0
Author: Marc Chevrier <marc.chevrier at sap.com>
AuthorDate: Fri Dec 1 17:10:45 2017 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 4 09:10:09 2017 -0500
Refactor per-source generator expression evaluation
Prepare to add generator expression support to more source properties.
Factor out some duplicated code into a helper to avoid further
duplication.
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index 3d72ae3..2443ece 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -362,9 +362,8 @@ std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject(
// Add source file specific flags.
if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) {
- cmGeneratorExpression ge;
- const char* processed = ge.Parse(cflags)->Evaluate(lg, config);
- lg->AppendFlags(flags, processed);
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, gtgt, config);
+ lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags));
}
return flags;
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index cface0d..611fbf8 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -153,4 +153,54 @@ private:
bool EvaluateForBuildsystem;
};
+class cmGeneratorExpressionInterpreter
+{
+ CM_DISABLE_COPY(cmGeneratorExpressionInterpreter)
+
+public:
+ cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator,
+ cmGeneratorTarget* generatorTarget,
+ const std::string& config)
+ : LocalGenerator(localGenerator)
+ , GeneratorTarget(generatorTarget)
+ , Config(config)
+ {
+ }
+
+ const char* Evaluate(const char* expression)
+ {
+ this->CompiledGeneratorExpression =
+ this->GeneratorExpression.Parse(expression);
+
+ return this->CompiledGeneratorExpression->Evaluate(
+ this->LocalGenerator, this->Config, false, this->GeneratorTarget);
+ }
+ const char* Evaluate(const std::string& expression)
+ {
+ return this->Evaluate(expression.c_str());
+ }
+
+protected:
+ cmGeneratorExpression& GetGeneratorExpression()
+ {
+ return this->GeneratorExpression;
+ }
+
+ cmCompiledGeneratorExpression& GetCompiledGeneratorExpression()
+ {
+ return *(this->CompiledGeneratorExpression);
+ }
+
+ cmLocalGenerator* GetLocalGenerator() { return this->LocalGenerator; }
+
+ cmGeneratorTarget* GetGeneratorTarget() { return this->GeneratorTarget; }
+
+private:
+ cmGeneratorExpression GeneratorExpression;
+ std::unique_ptr<cmCompiledGeneratorExpression> CompiledGeneratorExpression;
+ cmLocalGenerator* LocalGenerator = nullptr;
+ cmGeneratorTarget* GeneratorTarget = nullptr;
+ std::string Config;
+};
+
#endif
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index c376c8d..63f708b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -676,9 +676,51 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFileFromPath(
return buildFile;
}
+class XCodeGeneratorExpressionInterpreter
+ : public cmGeneratorExpressionInterpreter
+{
+ CM_DISABLE_COPY(XCodeGeneratorExpressionInterpreter)
+
+public:
+ XCodeGeneratorExpressionInterpreter(cmSourceFile* sourceFile,
+ cmLocalGenerator* localGenerator,
+ cmGeneratorTarget* generatorTarget)
+ : cmGeneratorExpressionInterpreter(localGenerator, generatorTarget,
+ "NO-PER-CONFIG-SUPPORT-IN-XCODE")
+ , SourceFile(sourceFile)
+ {
+ }
+
+ using cmGeneratorExpressionInterpreter::Evaluate;
+
+ const char* Evaluate(const char* expression, const char* property)
+ {
+ const char* processed = this->Evaluate(expression);
+ if (this->GetCompiledGeneratorExpression()
+ .GetHadContextSensitiveCondition()) {
+ std::ostringstream e;
+ /* clang-format off */
+ e <<
+ "Xcode does not support per-config per-source " << property << ":\n"
+ " " << expression << "\n"
+ "specified for source:\n"
+ " " << this->SourceFile->GetFullPath() << "\n";
+ /* clang-format on */
+ this->GetLocalGenerator()->IssueMessage(cmake::FATAL_ERROR, e.str());
+ }
+
+ return processed;
+ }
+
+private:
+ cmSourceFile* SourceFile = nullptr;
+};
+
cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
cmLocalGenerator* lg, cmSourceFile* sf, cmGeneratorTarget* gtgt)
{
+ XCodeGeneratorExpressionInterpreter genexInterpreter(sf, lg, gtgt);
+
// Add flags from target and source file properties.
std::string flags;
const char* srcfmt = sf->GetProperty("Fortran_FORMAT");
@@ -693,24 +735,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
break;
}
if (const char* cflags = sf->GetProperty("COMPILE_FLAGS")) {
- cmGeneratorExpression ge;
- std::string configName = "NO-PER-CONFIG-SUPPORT-IN-XCODE";
- std::unique_ptr<cmCompiledGeneratorExpression> compiledExpr =
- ge.Parse(cflags);
- const char* processed =
- compiledExpr->Evaluate(lg, configName, false, gtgt);
- if (compiledExpr->GetHadContextSensitiveCondition()) {
- std::ostringstream e;
- /* clang-format off */
- e <<
- "Xcode does not support per-config per-source COMPILE_FLAGS:\n"
- " " << cflags << "\n"
- "specified for source:\n"
- " " << sf->GetFullPath() << "\n";
- /* clang-format on */
- lg->IssueMessage(cmake::FATAL_ERROR, e.str());
- }
- lg->AppendFlags(flags, processed);
+ lg->AppendFlags(flags, genexInterpreter.Evaluate(cflags, "COMPILE_FLAGS"));
}
// Add per-source definitions.
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index f01ed7a..999c1f5 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1456,15 +1456,14 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
i != configs.end(); ++i, ++ci) {
std::string configUpper = cmSystemTools::UpperCase(*i);
cmLVS7GFileConfig fc;
+ cmGeneratorExpressionInterpreter genexInterpreter(lg, gt, *i);
bool needfc = false;
if (!objectName.empty()) {
fc.ObjectName = objectName;
needfc = true;
}
if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) {
- cmGeneratorExpression ge;
- std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(cflags);
- fc.CompileFlags = cge->Evaluate(lg, *i, false, gt);
+ fc.CompileFlags = genexInterpreter.Evaluate(cflags);
needfc = true;
}
if (lg->FortranProject) {
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index dd8a373..85dc55e 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -425,6 +425,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
std::string config = this->LocalGenerator->GetConfigName();
std::string configUpper = cmSystemTools::UpperCase(config);
+ cmGeneratorExpressionInterpreter genexInterpreter(
+ this->LocalGenerator, this->GeneratorTarget, config);
// Add Fortran format flags.
if (lang == "Fortran") {
@@ -433,10 +435,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
// Add flags from source file properties.
if (const char* cflags = source.GetProperty("COMPILE_FLAGS")) {
- cmGeneratorExpression ge;
- std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(cflags);
- const char* evaluatedFlags = cge->Evaluate(this->LocalGenerator, config,
- false, this->GeneratorTarget);
+ const char* evaluatedFlags = genexInterpreter.Evaluate(cflags);
this->LocalGenerator->AppendFlags(flags, evaluatedFlags);
*this->FlagFileStream << "# Custom flags: " << relativeObj
<< "_FLAGS = " << evaluatedFlags << "\n"
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 0262b3c..bad4112 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -136,12 +136,11 @@ std::string cmNinjaTargetGenerator::ComputeFlagsForObject(
// Add source file specific flags.
if (const char* cflags = source->GetProperty("COMPILE_FLAGS")) {
- std::string config = this->LocalGenerator->GetConfigName();
- cmGeneratorExpression ge;
- std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(cflags);
- const char* evaluatedFlags = cge->Evaluate(this->LocalGenerator, config,
- false, this->GeneratorTarget);
- this->LocalGenerator->AppendFlags(flags, evaluatedFlags);
+ cmGeneratorExpressionInterpreter genexInterpreter(
+ this->LocalGenerator, this->GeneratorTarget,
+ this->LocalGenerator->GetConfigName());
+ this->LocalGenerator->AppendFlags(flags,
+ genexInterpreter.Evaluate(cflags));
}
return flags;
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index cfac513..1bb07e7 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -692,6 +692,8 @@ static Json::Value DumpSourceFilesList(
std::vector<cmSourceFile*> files;
target->GetSourceFiles(files, config);
+ cmGeneratorExpressionInterpreter genexInterpreter(
+ target->GetLocalGenerator(), target, config);
std::unordered_map<LanguageData, std::vector<std::string>> fileGroups;
for (cmSourceFile* file : files) {
@@ -703,11 +705,7 @@ static Json::Value DumpSourceFilesList(
std::string compileFlags = ld.Flags;
if (const char* cflags = file->GetProperty("COMPILE_FLAGS")) {
- cmGeneratorExpression ge;
- auto cge = ge.Parse(cflags);
- const char* processed =
- cge->Evaluate(target->GetLocalGenerator(), config);
- lg->AppendFlags(compileFlags, processed);
+ lg->AppendFlags(compileFlags, genexInterpreter.Evaluate(cflags));
}
fileData.Flags = compileFlags;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index caeeeb9..3436f15 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2062,10 +2062,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
bool configDependentFlags = false;
std::string defines;
if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) {
-
- if (cmGeneratorExpression::Find(cflags) != std::string::npos) {
- configDependentFlags = true;
- }
+ configDependentFlags =
+ cmGeneratorExpression::Find(cflags) != std::string::npos;
flags += cflags;
}
if (const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) {
@@ -2122,8 +2120,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
}
// if we have flags or defines for this config then
// use them
- if (!flags.empty() || configDependentFlags || !configDefines.empty() ||
- compileAs || noWinRT) {
+ if (!flags.empty() || !configDefines.empty() || compileAs || noWinRT) {
(*this->BuildFileStream) << firstString;
firstString = ""; // only do firstString once
hasFlags = true;
@@ -2144,6 +2141,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
} else if (srclang == "CSharp") {
flagtable = gg->GetCSharpFlagTable();
}
+ cmGeneratorExpressionInterpreter genexInterpreter(
+ this->LocalGenerator, this->GeneratorTarget, *config);
cmVisualStudioGeneratorOptions clOptions(
this->LocalGenerator, cmVisualStudioGeneratorOptions::Compiler,
flagtable, 0, this);
@@ -2154,11 +2153,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
clOptions.AddFlag("CompileAsWinRT", "false");
}
if (configDependentFlags) {
- cmGeneratorExpression ge;
- std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(flags);
- std::string evaluatedFlags = cge->Evaluate(
- this->LocalGenerator, *config, false, this->GeneratorTarget);
- clOptions.Parse(evaluatedFlags.c_str());
+ clOptions.Parse(genexInterpreter.Evaluate(flags));
} else {
clOptions.Parse(flags.c_str());
}
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3519c8f2473c40fd6d2ce86e29742ef30b7e11f1
commit 3519c8f2473c40fd6d2ce86e29742ef30b7e11f1
Author: Justin Berger <j.david.berger at gmail.com>
AuthorDate: Fri Dec 1 12:09:51 2017 -0700
Commit: Justin Berger <j.david.berger at gmail.com>
CommitDate: Fri Dec 1 12:09:51 2017 -0700
utilities: Swapped to use std C++11 mutex/threading constructs
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx
index ac42fde..1b04ca2 100644
--- a/Source/cmServer.cxx
+++ b/Source/cmServer.cxx
@@ -18,6 +18,7 @@
#include <cstdint>
#include <iostream>
#include <memory>
+#include <mutex>
#include <utility>
void on_signal(uv_signal_t* signal, int signum)
@@ -490,7 +491,7 @@ void cmServerBase::StartShutDown()
SIGHUPHandler.reset();
{
- cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+ std::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
for (auto& connection : Connections) {
connection->OnConnectionShuttingDown();
}
@@ -537,7 +538,7 @@ cmServerBase::~cmServerBase()
void cmServerBase::AddNewConnection(cmConnection* ownedConnection)
{
{
- cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+ std::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
Connections.emplace_back(ownedConnection);
}
ownedConnection->SetServer(this);
@@ -554,7 +555,7 @@ void cmServerBase::OnDisconnect(cmConnection* pConnection)
return m.get() == pConnection;
};
{
- cm::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
+ std::unique_lock<cm::shared_mutex> lock(ConnectionsMutex);
Connections.erase(
std::remove_if(Connections.begin(), Connections.end(), pred),
Connections.end());
diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx
index d7e38c3..eb70416 100644
--- a/Source/cmUVHandlePtr.cxx
+++ b/Source/cmUVHandlePtr.cxx
@@ -4,9 +4,9 @@
#include "cmUVHandlePtr.h"
#include <assert.h>
+#include <mutex>
#include <stdlib.h>
-#include "cm_thread.hxx"
#include "cm_uv.h"
namespace cm {
@@ -97,16 +97,16 @@ struct uv_handle_deleter<uv_async_t>
* which is mandated by the standard for Deleter on
* shared_ptrs.
*/
- std::shared_ptr<cm::mutex> handleMutex;
+ std::shared_ptr<std::mutex> handleMutex;
uv_handle_deleter()
- : handleMutex(std::make_shared<cm::mutex>())
+ : handleMutex(std::make_shared<std::mutex>())
{
}
void operator()(uv_async_t* handle)
{
- cm::lock_guard<cm::mutex> lock(*handleMutex);
+ std::lock_guard<std::mutex> lock(*handleMutex);
default_delete(handle);
}
};
@@ -116,7 +116,7 @@ void uv_async_ptr::send()
auto deleter = std::get_deleter<uv_handle_deleter<uv_async_t>>(this->handle);
assert(deleter);
- cm::lock_guard<cm::mutex> lock(*deleter->handleMutex);
+ std::lock_guard<std::mutex> lock(*deleter->handleMutex);
if (this->handle) {
uv_async_send(*this);
}
diff --git a/Source/cm_thread.hxx b/Source/cm_thread.hxx
index ec5fe1d..84e6a5c 100644
--- a/Source/cm_thread.hxx
+++ b/Source/cm_thread.hxx
@@ -7,34 +7,6 @@
#include "cm_uv.h"
namespace cm {
-class mutex
-{
- CM_DISABLE_COPY(mutex)
- uv_mutex_t _M_;
-
-public:
- mutex() { uv_mutex_init(&_M_); }
- ~mutex() { uv_mutex_destroy(&_M_); }
-
- void lock() { uv_mutex_lock(&_M_); }
-
- void unlock() { uv_mutex_unlock(&_M_); }
-};
-
-template <typename T>
-class lock_guard
-{
- T& _mutex;
- CM_DISABLE_COPY(lock_guard)
-
-public:
- lock_guard(T& m)
- : _mutex(m)
- {
- _mutex.lock();
- }
- ~lock_guard() { _mutex.unlock(); }
-};
class shared_mutex
{
@@ -68,17 +40,5 @@ public:
}
~shared_lock() { _mutex.unlock_shared(); }
};
-
-template <typename T>
-class unique_lock : public lock_guard<T>
-{
- CM_DISABLE_COPY(unique_lock)
-
-public:
- unique_lock(T& m)
- : lock_guard<T>(m)
- {
- }
-};
}
#endif
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraSublimeTextGenerator.cxx | 5 +--
Source/cmGeneratorExpression.h | 50 +++++++++++++++++++++
Source/cmGlobalGenerator.h | 4 ++
Source/cmGlobalVisualStudioGenerator.h | 2 +
Source/cmGlobalXCodeGenerator.cxx | 61 ++++++++++++++++++--------
Source/cmIncludeExternalMSProjectCommand.cxx | 5 ++-
Source/cmLocalVisualStudio7Generator.cxx | 5 +--
Source/cmMakefileTargetGenerator.cxx | 7 ++-
Source/cmNinjaTargetGenerator.cxx | 11 +++--
Source/cmServer.cxx | 7 +--
Source/cmServerProtocol.cxx | 8 ++--
Source/cmUVHandlePtr.cxx | 10 ++---
Source/cmVisualStudio10TargetGenerator.cxx | 17 +++----
Source/cm_thread.hxx | 40 -----------------
14 files changed, 133 insertions(+), 99 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list