summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-04-23 22:50:47 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-04-24 22:03:06 +0200
commitd6f0006c0b12c74df2d93170262a017f15949320 (patch)
tree79e25c4662deb2b4875daca4bca61bc9e9cc4dbe /Source
parent3cb7048b521395fdc863dacacb85c6f7f28a1bc7 (diff)
downloadcmake-d6f0006c0b12c74df2d93170262a017f15949320.tar.gz
Use CM_DISABLE_COPY
Diffstat (limited to 'Source')
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.h6
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx1
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.h7
-rw-r--r--Source/CursesDialog/cmCursesDummyWidget.h6
-rw-r--r--Source/CursesDialog/cmCursesFilePathWidget.h8
-rw-r--r--Source/CursesDialog/cmCursesForm.cxx2
-rw-r--r--Source/CursesDialog/cmCursesForm.h7
-rw-r--r--Source/CursesDialog/cmCursesLabelWidget.h6
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.h5
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h5
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.h4
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.h5
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.h5
-rw-r--r--Source/CursesDialog/cmCursesWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesWidget.h7
-rw-r--r--Source/cmCLocaleEnvironmentScope.h7
-rw-r--r--Source/cmCPackPropertiesGenerator.h4
-rw-r--r--Source/cmCommand.h6
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx1
-rw-r--r--Source/cmCommandArgumentParserHelper.h8
-rw-r--r--Source/cmCryptoHash.h7
-rw-r--r--Source/cmDepends.h6
-rw-r--r--Source/cmDependsC.h6
-rw-r--r--Source/cmDependsFortran.h5
-rw-r--r--Source/cmDependsJava.h6
-rw-r--r--Source/cmDynamicLoader.cxx2
-rw-r--r--Source/cmDynamicLoader.h8
-rw-r--r--Source/cmFileLock.h7
-rw-r--r--Source/cmFileLockPool.h12
-rw-r--r--Source/cmGeneratorExpression.h10
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h3
-rw-r--r--Source/cmGeneratorTarget.h5
-rw-r--r--Source/cmInstallGenerator.h2
-rw-r--r--Source/cmLinkLineComputer.h7
-rw-r--r--Source/cmLinkLineDeviceComputer.h4
-rw-r--r--Source/cmLocale.h5
-rw-r--r--Source/cmMSVC60LinkLineComputer.h2
-rw-r--r--Source/cmMakefile.h8
-rw-r--r--Source/cmNinjaLinkLineComputer.h2
-rw-r--r--Source/cmScriptGenerator.cxx2
-rw-r--r--Source/cmScriptGenerator.h7
-rw-r--r--Source/cmSystemTools.h6
-rw-r--r--Source/cmTestGenerator.h4
-rw-r--r--Source/cmXMLWriter.h7
-rw-r--r--Source/cmake.h4
45 files changed, 99 insertions, 140 deletions
diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h
index 45f01aa516..90bcc22090 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.h
+++ b/Source/CursesDialog/cmCursesBoolWidget.h
@@ -12,6 +12,8 @@ class cmCursesMainForm;
class cmCursesBoolWidget : public cmCursesWidget
{
+ CM_DISABLE_COPY(cmCursesBoolWidget)
+
public:
cmCursesBoolWidget(int width, int height, int left, int top);
@@ -25,10 +27,6 @@ public:
// Set/Get the value (on/off).
void SetValueAsBool(bool value);
bool GetValueAsBool();
-
-protected:
- cmCursesBoolWidget(const cmCursesBoolWidget& from);
- void operator=(const cmCursesBoolWidget&);
};
#endif // cmCursesBoolWidget_h
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index cdde1a3380..d071c91783 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -14,7 +14,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmConfigure.h"
#include <assert.h>
#include <vector>
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h
index 1dbcfa4524..3c500785d4 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.h
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h
@@ -3,7 +3,7 @@
#ifndef cmCursesCacheEntryComposite_h
#define cmCursesCacheEntryComposite_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <string>
@@ -13,6 +13,8 @@ class cmake;
class cmCursesCacheEntryComposite
{
+ CM_DISABLE_COPY(cmCursesCacheEntryComposite)
+
public:
cmCursesCacheEntryComposite(const std::string& key, int labelwidth,
int entrywidth);
@@ -24,9 +26,6 @@ public:
friend class cmCursesMainForm;
protected:
- cmCursesCacheEntryComposite(const cmCursesCacheEntryComposite& from);
- void operator=(const cmCursesCacheEntryComposite&);
-
cmCursesLabelWidget* Label;
cmCursesLabelWidget* IsNewLabel;
cmCursesWidget* Entry;
diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h
index 0381f259c0..d9bb6babc6 100644
--- a/Source/CursesDialog/cmCursesDummyWidget.h
+++ b/Source/CursesDialog/cmCursesDummyWidget.h
@@ -12,6 +12,8 @@ class cmCursesMainForm;
class cmCursesDummyWidget : public cmCursesWidget
{
+ CM_DISABLE_COPY(cmCursesDummyWidget)
+
public:
cmCursesDummyWidget(int width, int height, int left, int top);
@@ -20,10 +22,6 @@ public:
// when this widget has focus. Returns true if the input was
// handled.
bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE;
-
-protected:
- cmCursesDummyWidget(const cmCursesDummyWidget& from);
- void operator=(const cmCursesDummyWidget&);
};
#endif // cmCursesDummyWidget_h
diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h
index b4c04cbcfe..6ad535b990 100644
--- a/Source/CursesDialog/cmCursesFilePathWidget.h
+++ b/Source/CursesDialog/cmCursesFilePathWidget.h
@@ -3,18 +3,16 @@
#ifndef cmCursesFilePathWidget_h
#define cmCursesFilePathWidget_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmCursesPathWidget.h"
class cmCursesFilePathWidget : public cmCursesPathWidget
{
+ CM_DISABLE_COPY(cmCursesFilePathWidget)
+
public:
cmCursesFilePathWidget(int width, int height, int left, int top);
-
-protected:
- cmCursesFilePathWidget(const cmCursesFilePathWidget& from);
- void operator=(const cmCursesFilePathWidget&);
};
#endif // cmCursesFilePathWidget_h
diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx
index 12e5d75b87..06c1e9c70d 100644
--- a/Source/CursesDialog/cmCursesForm.cxx
+++ b/Source/CursesDialog/cmCursesForm.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesForm.h"
-#include "cmConfigure.h"
-
cmsys::ofstream cmCursesForm::DebugFile;
bool cmCursesForm::Debug = false;
diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h
index 7eb94a87ed..553105c764 100644
--- a/Source/CursesDialog/cmCursesForm.h
+++ b/Source/CursesDialog/cmCursesForm.h
@@ -3,7 +3,7 @@
#ifndef cmCursesForm_h
#define cmCursesForm_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmCursesStandardIncludes.h"
@@ -11,6 +11,8 @@
class cmCursesForm
{
+ CM_DISABLE_COPY(cmCursesForm)
+
public:
cmCursesForm();
virtual ~cmCursesForm();
@@ -55,9 +57,6 @@ protected:
static cmsys::ofstream DebugFile;
static bool Debug;
- cmCursesForm(const cmCursesForm& form);
- void operator=(const cmCursesForm&);
-
FORM* Form;
};
diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h
index a0de4c6ddb..267de7c8c1 100644
--- a/Source/CursesDialog/cmCursesLabelWidget.h
+++ b/Source/CursesDialog/cmCursesLabelWidget.h
@@ -14,6 +14,8 @@ class cmCursesMainForm;
class cmCursesLabelWidget : public cmCursesWidget
{
+ CM_DISABLE_COPY(cmCursesLabelWidget)
+
public:
cmCursesLabelWidget(int width, int height, int left, int top,
const std::string& name);
@@ -24,10 +26,6 @@ public:
// when this widget has focus. Returns true if the input was
// handled
bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE;
-
-protected:
- cmCursesLabelWidget(const cmCursesLabelWidget& from);
- void operator=(const cmCursesLabelWidget&);
};
#endif // cmCursesLabelWidget_h
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h
index ab49c07c66..cd8e0953a3 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.h
+++ b/Source/CursesDialog/cmCursesLongMessageForm.h
@@ -13,6 +13,8 @@
class cmCursesLongMessageForm : public cmCursesForm
{
+ CM_DISABLE_COPY(cmCursesLongMessageForm)
+
public:
cmCursesLongMessageForm(std::vector<std::string> const& messages,
const char* title);
@@ -38,9 +40,6 @@ public:
void UpdateStatusBar() CM_OVERRIDE;
protected:
- cmCursesLongMessageForm(const cmCursesLongMessageForm& from);
- void operator=(const cmCursesLongMessageForm&);
-
std::string Messages;
std::string Title;
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index b91211ec94..e35cf3ed7b 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -23,6 +23,8 @@ class cmake;
*/
class cmCursesMainForm : public cmCursesForm
{
+ CM_DISABLE_COPY(cmCursesMainForm)
+
public:
cmCursesMainForm(std::vector<std::string> const& args, int initwidth);
~cmCursesMainForm() CM_OVERRIDE;
@@ -103,9 +105,6 @@ public:
static void UpdateProgress(const char* msg, float prog, void*);
protected:
- cmCursesMainForm(const cmCursesMainForm& from);
- void operator=(const cmCursesMainForm&);
-
// Copy the cache values from the user interface to the actual
// cache.
void FillCacheManagerFromUI();
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h
index 4b2e8b41ad..7f4416f956 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.h
+++ b/Source/CursesDialog/cmCursesOptionsWidget.h
@@ -15,6 +15,8 @@ class cmCursesMainForm;
class cmCursesOptionsWidget : public cmCursesWidget
{
+ CM_DISABLE_COPY(cmCursesOptionsWidget)
+
public:
cmCursesOptionsWidget(int width, int height, int left, int top);
@@ -29,8 +31,6 @@ public:
void PreviousOption();
protected:
- cmCursesOptionsWidget(const cmCursesOptionsWidget& from);
- void operator=(const cmCursesOptionsWidget&);
std::vector<std::string> Options;
std::vector<std::string>::size_type CurrentOption;
};
diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h
index 097eeca3ea..ae6c16d025 100644
--- a/Source/CursesDialog/cmCursesPathWidget.h
+++ b/Source/CursesDialog/cmCursesPathWidget.h
@@ -14,6 +14,8 @@ class cmCursesMainForm;
class cmCursesPathWidget : public cmCursesStringWidget
{
+ CM_DISABLE_COPY(cmCursesPathWidget)
+
public:
cmCursesPathWidget(int width, int height, int left, int top);
@@ -26,9 +28,6 @@ public:
void OnType(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE;
protected:
- cmCursesPathWidget(const cmCursesPathWidget& from);
- void operator=(const cmCursesPathWidget&);
-
std::string LastString;
std::string LastGlob;
bool Cycle;
diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h
index c07bfcecee..5eb33666d0 100644
--- a/Source/CursesDialog/cmCursesStringWidget.h
+++ b/Source/CursesDialog/cmCursesStringWidget.h
@@ -20,6 +20,8 @@ class cmCursesMainForm;
class cmCursesStringWidget : public cmCursesWidget
{
+ CM_DISABLE_COPY(cmCursesStringWidget)
+
public:
cmCursesStringWidget(int width, int height, int left, int top);
@@ -60,9 +62,6 @@ public:
bool PrintKeys() CM_OVERRIDE;
protected:
- cmCursesStringWidget(const cmCursesStringWidget& from);
- void operator=(const cmCursesStringWidget&);
-
// true if the widget is in edit mode
bool InEdit;
char* OriginalString;
diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx
index 229a050bb5..054f27e298 100644
--- a/Source/CursesDialog/cmCursesWidget.cxx
+++ b/Source/CursesDialog/cmCursesWidget.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCursesWidget.h"
-#include "cmConfigure.h"
-
cmCursesWidget::cmCursesWidget(int width, int height, int left, int top)
{
this->Field = new_field(height, width, top, left, 0, 0);
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h
index 5ce8a75cdc..3470d70965 100644
--- a/Source/CursesDialog/cmCursesWidget.h
+++ b/Source/CursesDialog/cmCursesWidget.h
@@ -3,7 +3,7 @@
#ifndef cmCursesWidget_h
#define cmCursesWidget_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmCursesStandardIncludes.h"
#include "cmStateTypes.h"
@@ -14,6 +14,8 @@ class cmCursesMainForm;
class cmCursesWidget
{
+ CM_DISABLE_COPY(cmCursesWidget)
+
public:
cmCursesWidget(int width, int height, int left, int top);
virtual ~cmCursesWidget();
@@ -59,9 +61,6 @@ public:
friend class cmCursesMainForm;
protected:
- cmCursesWidget(const cmCursesWidget& from);
- void operator=(const cmCursesWidget&);
-
cmStateEnums::CacheEntryType Type;
std::string Value;
FIELD* Field;
diff --git a/Source/cmCLocaleEnvironmentScope.h b/Source/cmCLocaleEnvironmentScope.h
index 1e7c42ada1..e956cb24d9 100644
--- a/Source/cmCLocaleEnvironmentScope.h
+++ b/Source/cmCLocaleEnvironmentScope.h
@@ -3,21 +3,20 @@
#ifndef cmCLocaleEnvironmentScope_h
#define cmCLocaleEnvironmentScope_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <map>
#include <string>
class cmCLocaleEnvironmentScope
{
+ CM_DISABLE_COPY(cmCLocaleEnvironmentScope)
+
public:
cmCLocaleEnvironmentScope();
~cmCLocaleEnvironmentScope();
private:
- cmCLocaleEnvironmentScope(cmCLocaleEnvironmentScope const&);
- cmCLocaleEnvironmentScope& operator=(cmCLocaleEnvironmentScope const&);
-
std::string GetEnv(std::string const& key);
void SetEnv(std::string const& key, std::string const& value);
diff --git a/Source/cmCPackPropertiesGenerator.h b/Source/cmCPackPropertiesGenerator.h
index 107ccf9e38..48f4c10f44 100644
--- a/Source/cmCPackPropertiesGenerator.h
+++ b/Source/cmCPackPropertiesGenerator.h
@@ -3,7 +3,7 @@
#ifndef cmCPackPropertiesGenerator_h
#define cmCPackPropertiesGenerator_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmScriptGenerator.h"
@@ -20,6 +20,8 @@ class cmLocalGenerator;
*/
class cmCPackPropertiesGenerator : public cmScriptGenerator
{
+ CM_DISABLE_COPY(cmCPackPropertiesGenerator)
+
public:
cmCPackPropertiesGenerator(cmLocalGenerator* lg,
cmInstalledFile const& installedFile,
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index f4a75d541d..62eced0792 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -24,6 +24,8 @@ struct cmListFileArgument;
*/
class cmCommand
{
+ CM_DISABLE_COPY(cmCommand)
+
public:
/**
* Construct the command. By default it has no makefile.
@@ -103,10 +105,6 @@ public:
*/
void SetError(const std::string& e);
-private:
- cmCommand(cmCommand const&); // = delete;
- cmCommand& operator=(cmCommand const&); // = delete;
-
protected:
cmMakefile* Makefile;
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index 153efc4f01..4eb4531f65 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -8,7 +8,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-#include "cmConfigure.h"
#include <iostream>
#include <sstream>
#include <string.h>
diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h
index c0c1cd94bf..465ca9e285 100644
--- a/Source/cmCommandArgumentParserHelper.h
+++ b/Source/cmCommandArgumentParserHelper.h
@@ -3,7 +3,7 @@
#ifndef cmCommandArgumentParserHelper_h
#define cmCommandArgumentParserHelper_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <string>
#include <vector>
@@ -12,6 +12,8 @@ class cmMakefile;
class cmCommandArgumentParserHelper
{
+ CM_DISABLE_COPY(cmCommandArgumentParserHelper)
+
public:
struct ParserType
{
@@ -60,10 +62,6 @@ public:
char BSLASHVariable[3];
private:
- cmCommandArgumentParserHelper(cmCommandArgumentParserHelper const&);
- cmCommandArgumentParserHelper& operator=(
- cmCommandArgumentParserHelper const&);
-
std::string::size_type InputBufferPos;
std::string InputBuffer;
std::vector<char> OutputBuffer;
diff --git a/Source/cmCryptoHash.h b/Source/cmCryptoHash.h
index ac92c48c05..c380d85ff2 100644
--- a/Source/cmCryptoHash.h
+++ b/Source/cmCryptoHash.h
@@ -3,7 +3,7 @@
#ifndef cmCryptoHash_h
#define cmCryptoHash_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <stddef.h>
#include <string>
@@ -16,6 +16,8 @@
*/
class cmCryptoHash
{
+ CM_DISABLE_COPY(cmCryptoHash)
+
public:
enum Algo
{
@@ -78,9 +80,6 @@ public:
std::string FinalizeHex();
private:
- cmCryptoHash(cmCryptoHash const&);
- cmCryptoHash& operator=(cmCryptoHash const&);
-
unsigned int Id;
struct rhash_context* CTX;
};
diff --git a/Source/cmDepends.h b/Source/cmDepends.h
index a80b585404..b33feb9022 100644
--- a/Source/cmDepends.h
+++ b/Source/cmDepends.h
@@ -24,6 +24,8 @@ class cmLocalGenerator;
*/
class cmDepends
{
+ CM_DISABLE_COPY(cmDepends)
+
public:
/** Instances need to know the build directory name and the relative
path from the build directory to the target file. */
@@ -116,10 +118,6 @@ protected:
std::vector<std::string> IncludePath;
void SetIncludePathFromLanguage(const std::string& lang);
-
-private:
- cmDepends(cmDepends const&); // Purposely not implemented.
- void operator=(cmDepends const&); // Purposely not implemented.
};
#endif
diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h
index 4f52826c7c..250d40f8a6 100644
--- a/Source/cmDependsC.h
+++ b/Source/cmDependsC.h
@@ -22,6 +22,8 @@ class cmLocalGenerator;
*/
class cmDependsC : public cmDepends
{
+ CM_DISABLE_COPY(cmDependsC)
+
public:
/** Checking instances need to know the build directory name and the
relative path from the build directory to the target file. */
@@ -93,10 +95,6 @@ protected:
void WriteCacheFile() const;
void ReadCacheFile();
-
-private:
- cmDependsC(cmDependsC const&); // Purposely not implemented.
- void operator=(cmDependsC const&); // Purposely not implemented.
};
#endif
diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h
index a9a1ed39be..ec208af3ad 100644
--- a/Source/cmDependsFortran.h
+++ b/Source/cmDependsFortran.h
@@ -21,6 +21,8 @@ class cmLocalGenerator;
*/
class cmDependsFortran : public cmDepends
{
+ CM_DISABLE_COPY(cmDependsFortran)
+
public:
/** Checking instances need to know the build directory name and the
relative path from the build directory to the target file. */
@@ -77,9 +79,6 @@ protected:
cmDependsFortranInternals* Internal;
private:
- cmDependsFortran(cmDependsFortran const&); // Purposely not implemented.
- void operator=(cmDependsFortran const&); // Purposely not implemented.
-
std::string MaybeConvertToRelativePath(std::string const& base,
std::string const& path);
};
diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h
index 6efa51a60e..a07bf0979c 100644
--- a/Source/cmDependsJava.h
+++ b/Source/cmDependsJava.h
@@ -17,6 +17,8 @@
*/
class cmDependsJava : public cmDepends
{
+ CM_DISABLE_COPY(cmDependsJava)
+
public:
/** Checking instances need to know the build directory name and the
relative path from the build directory to the target file. */
@@ -33,10 +35,6 @@ protected:
bool CheckDependencies(
std::istream& internalDepends, const char* internalDependsFileName,
std::map<std::string, DependencyVector>& validDeps) CM_OVERRIDE;
-
-private:
- cmDependsJava(cmDependsJava const&); // Purposely not implemented.
- void operator=(cmDependsJava const&); // Purposely not implemented.
};
#endif
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index 76a4a2946a..f530ba7364 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -2,8 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmDynamicLoader.h"
-#include "cmConfigure.h"
-
#include <map>
#include <string>
#include <utility>
diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h
index dd69b40071..7c46dd5d4d 100644
--- a/Source/cmDynamicLoader.h
+++ b/Source/cmDynamicLoader.h
@@ -8,12 +8,14 @@
#ifndef cmDynamicLoader_h
#define cmDynamicLoader_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmsys/DynamicLoader.hxx" // IWYU pragma: export
class cmDynamicLoader
{
+ CM_DISABLE_COPY(cmDynamicLoader)
+
public:
// Description:
// Load a dynamic library into the current process.
@@ -28,10 +30,6 @@ public:
protected:
cmDynamicLoader() {}
~cmDynamicLoader() {}
-
-private:
- cmDynamicLoader(const cmDynamicLoader&); // Not implemented.
- void operator=(const cmDynamicLoader&); // Not implemented.
};
#endif
diff --git a/Source/cmFileLock.h b/Source/cmFileLock.h
index 8f996cfe64..ccef508162 100644
--- a/Source/cmFileLock.h
+++ b/Source/cmFileLock.h
@@ -3,7 +3,7 @@
#ifndef cmFileLock_h
#define cmFileLock_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <string>
@@ -21,6 +21,8 @@ class cmFileLockResult;
*/
class cmFileLock
{
+ CM_DISABLE_COPY(cmFileLock)
+
public:
cmFileLock();
~cmFileLock();
@@ -44,9 +46,6 @@ public:
bool IsLocked(const std::string& filename) const;
private:
- cmFileLock(const cmFileLock&);
- cmFileLock& operator=(const cmFileLock&);
-
cmFileLockResult OpenFile();
cmFileLockResult LockWithoutTimeout();
cmFileLockResult LockWithTimeout(unsigned long timeoutSec);
diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h
index 09c984c009..689ddd7b73 100644
--- a/Source/cmFileLockPool.h
+++ b/Source/cmFileLockPool.h
@@ -3,7 +3,7 @@
#ifndef cmFileLockPool_h
#define cmFileLockPool_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <list>
#include <string>
@@ -13,6 +13,8 @@ class cmFileLockResult;
class cmFileLockPool
{
+ CM_DISABLE_COPY(cmFileLockPool)
+
public:
cmFileLockPool();
~cmFileLockPool();
@@ -52,13 +54,12 @@ public:
cmFileLockResult Release(const std::string& filename);
private:
- cmFileLockPool(const cmFileLockPool&);
- cmFileLockPool& operator=(const cmFileLockPool&);
-
bool IsAlreadyLocked(const std::string& filename) const;
class ScopePool
{
+ CM_DISABLE_COPY(ScopePool)
+
public:
ScopePool();
~ScopePool();
@@ -69,9 +70,6 @@ private:
bool IsAlreadyLocked(const std::string& filename) const;
private:
- ScopePool(const ScopePool&);
- ScopePool& operator=(const ScopePool&);
-
typedef std::list<cmFileLock*> List;
typedef List::iterator It;
typedef List::const_iterator CIt;
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 694ce8a992..34516f5c5a 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -31,6 +31,8 @@ struct cmGeneratorExpressionEvaluator;
*/
class cmGeneratorExpression
{
+ CM_DISABLE_COPY(cmGeneratorExpression)
+
public:
/** Construct. */
cmGeneratorExpression(
@@ -61,14 +63,13 @@ public:
static std::string StripEmptyListElements(const std::string& input);
private:
- cmGeneratorExpression(const cmGeneratorExpression&);
- void operator=(const cmGeneratorExpression&);
-
cmListFileBacktrace Backtrace;
};
class cmCompiledGeneratorExpression
{
+ CM_DISABLE_COPY(cmCompiledGeneratorExpression)
+
public:
const char* Evaluate(
cmLocalGenerator* lg, const std::string& config, bool quiet = false,
@@ -133,9 +134,6 @@ private:
friend class cmGeneratorExpression;
- cmCompiledGeneratorExpression(const cmCompiledGeneratorExpression&);
- void operator=(const cmCompiledGeneratorExpression&);
-
cmListFileBacktrace Backtrace;
std::vector<cmGeneratorExpressionEvaluator*> Evaluators;
const std::string Input;
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index a6a341b30e..a0a826ac69 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -30,8 +30,7 @@ struct cmGeneratorExpressionEvaluator
cmGeneratorExpressionDAGChecker*) const = 0;
private:
- cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator&);
- void operator=(const cmGeneratorExpressionEvaluator&);
+ CM_DISABLE_COPY(cmGeneratorExpressionEvaluator)
};
struct TextContent : public cmGeneratorExpressionEvaluator
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index ae12f97ad1..13b6b73e80 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -27,6 +27,8 @@ class cmTarget;
class cmGeneratorTarget
{
+ CM_DISABLE_COPY(cmGeneratorTarget)
+
public:
cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg);
~cmGeneratorTarget();
@@ -701,9 +703,6 @@ private:
void CheckPropertyCompatibility(cmComputeLinkInformation* info,
const std::string& config) const;
- cmGeneratorTarget(cmGeneratorTarget const&);
- void operator=(cmGeneratorTarget const&);
-
struct LinkImplClosure : public std::vector<cmGeneratorTarget const*>
{
LinkImplClosure()
diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h
index bb1dd54258..de19f98011 100644
--- a/Source/cmInstallGenerator.h
+++ b/Source/cmInstallGenerator.h
@@ -21,6 +21,8 @@ class cmMakefile;
*/
class cmInstallGenerator : public cmScriptGenerator
{
+ CM_DISABLE_COPY(cmInstallGenerator)
+
public:
enum MessageLevel
{
diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h
index d8dacf3982..27b8adbbe2 100644
--- a/Source/cmLinkLineComputer.h
+++ b/Source/cmLinkLineComputer.h
@@ -4,7 +4,7 @@
#ifndef cmLinkLineComputer_h
#define cmLinkLineComputer_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <string>
@@ -16,6 +16,8 @@ class cmOutputConverter;
class cmLinkLineComputer
{
+ CM_DISABLE_COPY(cmLinkLineComputer)
+
public:
cmLinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir);
@@ -41,9 +43,6 @@ public:
std::string const& config);
protected:
- cmLinkLineComputer(cmLinkLineComputer const&);
- cmLinkLineComputer& operator=(cmLinkLineComputer const&);
-
std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
std::string ComputeRPath(cmComputeLinkInformation& cli);
diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h
index a827b069a3..e9e98acb34 100644
--- a/Source/cmLinkLineDeviceComputer.h
+++ b/Source/cmLinkLineDeviceComputer.h
@@ -18,6 +18,8 @@ class cmStateDirectory;
class cmLinkLineDeviceComputer : public cmLinkLineComputer
{
+ CM_DISABLE_COPY(cmLinkLineDeviceComputer)
+
public:
cmLinkLineDeviceComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir);
@@ -33,6 +35,8 @@ public:
class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer
{
+ CM_DISABLE_COPY(cmNinjaLinkLineDeviceComputer)
+
public:
cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir,
diff --git a/Source/cmLocale.h b/Source/cmLocale.h
index 086f448ef0..9f90a3a994 100644
--- a/Source/cmLocale.h
+++ b/Source/cmLocale.h
@@ -10,6 +10,8 @@
class cmLocaleRAII
{
+ CM_DISABLE_COPY(cmLocaleRAII)
+
public:
cmLocaleRAII()
: OldLocale(setlocale(LC_CTYPE, CM_NULLPTR))
@@ -19,9 +21,6 @@ public:
~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); }
private:
- cmLocaleRAII(cmLocaleRAII const&);
- cmLocaleRAII& operator=(cmLocaleRAII const&);
-
std::string OldLocale;
};
diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h
index 612658c4e4..e494060555 100644
--- a/Source/cmMSVC60LinkLineComputer.h
+++ b/Source/cmMSVC60LinkLineComputer.h
@@ -15,6 +15,8 @@ class cmStateDirectory;
class cmMSVC60LinkLineComputer : public cmLinkLineComputer
{
+ CM_DISABLE_COPY(cmMSVC60LinkLineComputer)
+
public:
cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir);
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 2f4cea6523..52a64982c8 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -54,6 +54,8 @@ class cmVariableWatch;
*/
class cmMakefile
{
+ CM_DISABLE_COPY(cmMakefile)
+
public:
/* Mark a variable as used */
void MarkVariableAsUsed(const std::string& var);
@@ -709,6 +711,7 @@ public:
/** Helper class to push and pop scopes automatically. */
class ScopePushPop
{
+ CM_DISABLE_COPY(ScopePushPop)
public:
ScopePushPop(cmMakefile* m)
: Makefile(m)
@@ -717,8 +720,6 @@ public:
}
~ScopePushPop() { this->Makefile->PopScope(); }
private:
- ScopePushPop(ScopePushPop const&);
- ScopePushPop& operator=(ScopePushPop const&);
cmMakefile* Makefile;
};
@@ -831,9 +832,6 @@ protected:
cmExecutionStatus& status);
private:
- cmMakefile(const cmMakefile& mf);
- cmMakefile& operator=(const cmMakefile& mf);
-
cmStateSnapshot StateSnapshot;
cmListFileBacktrace Backtrace;
diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h
index db6d4a8de5..e612e883e8 100644
--- a/Source/cmNinjaLinkLineComputer.h
+++ b/Source/cmNinjaLinkLineComputer.h
@@ -16,6 +16,8 @@ class cmStateDirectory;
class cmNinjaLinkLineComputer : public cmLinkLineComputer
{
+ CM_DISABLE_COPY(cmNinjaLinkLineComputer)
+
public:
cmNinjaLinkLineComputer(cmOutputConverter* outputConverter,
cmStateDirectory stateDir,
diff --git a/Source/cmScriptGenerator.cxx b/Source/cmScriptGenerator.cxx
index 3cf25376c2..753a1ba6f7 100644
--- a/Source/cmScriptGenerator.cxx
+++ b/Source/cmScriptGenerator.cxx
@@ -4,8 +4,6 @@
#include "cmSystemTools.h"
-#include "cmConfigure.h"
-
cmScriptGenerator::cmScriptGenerator(
const std::string& config_var,
std::vector<std::string> const& configurations)
diff --git a/Source/cmScriptGenerator.h b/Source/cmScriptGenerator.h
index 4023f3eb47..d0879c687f 100644
--- a/Source/cmScriptGenerator.h
+++ b/Source/cmScriptGenerator.h
@@ -3,7 +3,7 @@
#ifndef cmScriptGenerator_h
#define cmScriptGenerator_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include <ostream>
#include <string>
@@ -47,6 +47,8 @@ inline std::ostream& operator<<(std::ostream& os,
*/
class cmScriptGenerator
{
+ CM_DISABLE_COPY(cmScriptGenerator)
+
public:
cmScriptGenerator(const std::string& config_var,
std::vector<std::string> const& configurations);
@@ -87,9 +89,6 @@ protected:
bool ActionsPerConfig;
private:
- cmScriptGenerator(cmScriptGenerator const&);
- cmScriptGenerator& operator=(cmScriptGenerator const&);
-
void GenerateScriptActionsOnce(std::ostream& os, Indent indent);
void GenerateScriptActionsPerConfig(std::ostream& os, Indent indent);
};
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 3ba2c223b0..d0902b1f9f 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -3,7 +3,7 @@
#ifndef cmSystemTools_h
#define cmSystemTools_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmProcessOutput.h"
#include "cmsys/Process.h"
@@ -379,14 +379,12 @@ public:
original environment. */
class SaveRestoreEnvironment
{
+ CM_DISABLE_COPY(SaveRestoreEnvironment)
public:
SaveRestoreEnvironment();
~SaveRestoreEnvironment();
private:
- SaveRestoreEnvironment(SaveRestoreEnvironment const&);
- SaveRestoreEnvironment& operator=(SaveRestoreEnvironment const&);
-
std::vector<std::string> Env;
};
#endif
diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h
index 9a25e33192..b2273050f5 100644
--- a/Source/cmTestGenerator.h
+++ b/Source/cmTestGenerator.h
@@ -3,7 +3,7 @@
#ifndef cmTestGenerator_h
#define cmTestGenerator_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmScriptGenerator.h"
@@ -20,6 +20,8 @@ class cmTest;
*/
class cmTestGenerator : public cmScriptGenerator
{
+ CM_DISABLE_COPY(cmTestGenerator)
+
public:
cmTestGenerator(cmTest* test,
std::vector<std::string> const& configurations =
diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h
index 14c82b16c9..ed76a88c7f 100644
--- a/Source/cmXMLWriter.h
+++ b/Source/cmXMLWriter.h
@@ -3,7 +3,7 @@
#ifndef cmXMLWiter_h
#define cmXMLWiter_h
-#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmConfigure.h"
#include "cmXMLSafe.h"
@@ -14,6 +14,8 @@
class cmXMLWriter
{
+ CM_DISABLE_COPY(cmXMLWriter)
+
public:
cmXMLWriter(std::ostream& output, std::size_t level = 0);
~cmXMLWriter();
@@ -63,9 +65,6 @@ public:
void SetIndentationElement(std::string const& element);
private:
- cmXMLWriter(const cmXMLWriter&);
- cmXMLWriter& operator=(const cmXMLWriter&);
-
void ConditionalLineBreak(bool condition, std::size_t indent);
void PreAttribute();
diff --git a/Source/cmake.h b/Source/cmake.h
index 6a6beb4243..16a2830e47 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -55,6 +55,8 @@ struct cmDocumentationEntry;
class cmake
{
+ CM_DISABLE_COPY(cmake)
+
public:
enum MessageType
{
@@ -460,8 +462,6 @@ protected:
cmVariableWatch* VariableWatch;
private:
- cmake(const cmake&); // Not implemented.
- void operator=(const cmake&); // Not implemented.
ProgressCallbackType ProgressCallback;
void* ProgressCallbackClientData;
bool InTryCompile;