summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index c60fc33..53d44f1 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -5,6 +5,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <functional>
#include <map>
#include <memory> // IWYU pragma: keep
#include <set>
@@ -59,8 +60,6 @@ struct cmDocumentationEntry;
class cmake
{
- CM_DISABLE_COPY(cmake)
-
public:
enum Role
{
@@ -119,6 +118,9 @@ public:
/// Destructor
~cmake();
+ cmake(cmake const&) = delete;
+ cmake& operator=(cmake const&) = delete;
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
Json::Value ReportVersionJson() const;
Json::Value ReportCapabilitiesJson(bool haveServerMode) const;
@@ -271,7 +273,7 @@ public:
///! Parse command line arguments that might set cache values
bool SetCacheArgs(const std::vector<std::string>&);
- typedef void (*ProgressCallbackType)(const char* msg, float progress, void*);
+ using ProgressCallbackType = std::function<void(const char*, float)>;
/**
* Set the function used by GUIs to receive progress updates
* Function gets passed: message as a const char*, a progress
@@ -279,7 +281,7 @@ public:
* number provided may be negative in cases where a message is
* to be displayed without any progress percentage.
*/
- void SetProgressCallback(ProgressCallbackType f, void* clientData = nullptr);
+ void SetProgressCallback(ProgressCallbackType f);
///! this is called by generators to update the progress
void UpdateProgress(const char* msg, float prog);
@@ -442,7 +444,6 @@ public:
protected:
void RunCheckForUnusedVariables();
- void InitializeProperties();
int HandleDeleteCacheVariables(const std::string& var);
typedef std::vector<cmGlobalGeneratorFactory*> RegisteredGeneratorsVector;
@@ -462,7 +463,8 @@ protected:
std::string GeneratorToolset;
///! read in a cmake list file to initialize the cache
- void ReadListFile(const std::vector<std::string>& args, const char* path);
+ void ReadListFile(const std::vector<std::string>& args,
+ const std::string& path);
bool FindPackage(const std::vector<std::string>& args);
///! Check if CMAKE_CACHEFILE_DIR is set. If it is not, delete the log file.
@@ -485,8 +487,6 @@ protected:
private:
ProgressCallbackType ProgressCallback;
- void* ProgressCallbackClientData;
- bool InTryCompile;
WorkingMode CurrentWorkingMode;
bool DebugOutput;
bool Trace;
@@ -534,18 +534,6 @@ private:
void AppendGlobalGeneratorsDocumentation(std::vector<cmDocumentationEntry>&);
void AppendExtraGeneratorsDocumentation(std::vector<cmDocumentationEntry>&);
-
- /**
- * Convert a message type between a warning and an error, based on the state
- * of the error output CMake variables, in the cache.
- */
- MessageType ConvertMessageType(MessageType t) const;
-
- /*
- * Check if messages of this type should be output, based on the state of the
- * warning and error output CMake variables, in the cache.
- */
- bool IsMessageTypeVisible(MessageType t) const;
};
#define CMAKE_STANDARD_OPTIONS_TABLE \