summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-24 14:45:07 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-24 17:12:02 (GMT)
commitec7cf7ea1311adaf6eb8dd1ab5c2aa8e3745339e (patch)
tree9dad5b456eea444fe1316f928bde9adf0a991bed /Source
parentabebcd235c94e05a20003430981a1b46b0fb7f95 (diff)
downloadCMake-ec7cf7ea1311adaf6eb8dd1ab5c2aa8e3745339e.zip
CMake-ec7cf7ea1311adaf6eb8dd1ab5c2aa8e3745339e.tar.gz
CMake-ec7cf7ea1311adaf6eb8dd1ab5c2aa8e3745339e.tar.bz2
install: Thread message level setting through internal API
Create a cmInstallGenerator::MessageLevel enumeration for future use in specifying install message verbosity. Thread values of the type through constructors and save the value as a member of cmInstallGenerator. Use only a "MessageDefault" value for now.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmInstallCommand.cxx15
-rw-r--r--Source/cmInstallDirectoryGenerator.cxx4
-rw-r--r--Source/cmInstallDirectoryGenerator.h1
-rw-r--r--Source/cmInstallExportGenerator.cxx3
-rw-r--r--Source/cmInstallExportGenerator.h1
-rw-r--r--Source/cmInstallFilesCommand.cxx4
-rw-r--r--Source/cmInstallFilesGenerator.cxx3
-rw-r--r--Source/cmInstallFilesGenerator.h1
-rw-r--r--Source/cmInstallGenerator.cxx6
-rw-r--r--Source/cmInstallGenerator.h9
-rw-r--r--Source/cmInstallProgramsCommand.cxx4
-rw-r--r--Source/cmInstallScriptGenerator.cxx2
-rw-r--r--Source/cmInstallTargetGenerator.cxx6
-rw-r--r--Source/cmInstallTargetGenerator.h1
-rw-r--r--Source/cmLocalGenerator.cxx1
15 files changed, 49 insertions, 12 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 0041122..d0eea35 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -25,9 +25,12 @@
static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target,
const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false)
{
+ cmInstallGenerator::MessageLevel message =
+ cmInstallGenerator::MessageDefault;
return new cmInstallTargetGenerator(target, args.GetDestination().c_str(),
impLib, args.GetPermissions().c_str(),
args.GetConfigurations(), args.GetComponent().c_str(),
+ message,
args.GetOptional() || forceOpt);
}
@@ -36,10 +39,13 @@ static cmInstallFilesGenerator* CreateInstallFilesGenerator(
const std::vector<std::string>& absFiles,
const cmInstallCommandArguments& args, bool programs)
{
+ cmInstallGenerator::MessageLevel message =
+ cmInstallGenerator::MessageDefault;
return new cmInstallFilesGenerator(mf,
absFiles, args.GetDestination().c_str(),
programs, args.GetPermissions().c_str(),
args.GetConfigurations(), args.GetComponent().c_str(),
+ message,
args.GetRename().c_str(), args.GetOptional());
}
@@ -1208,6 +1214,9 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
return false;
}
+ cmInstallGenerator::MessageLevel message =
+ cmInstallGenerator::MessageDefault;
+
// Create the directory install generator.
this->Makefile->AddInstallGenerator(
new cmInstallDirectoryGenerator(dirs, destination,
@@ -1215,6 +1224,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
permissions_dir.c_str(),
configurations,
component.c_str(),
+ message,
literal_args.c_str(),
optional));
@@ -1333,13 +1343,16 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
}
}
+ cmInstallGenerator::MessageLevel message =
+ cmInstallGenerator::MessageDefault;
+
// Create the export install generator.
cmInstallExportGenerator* exportGenerator =
new cmInstallExportGenerator(
exportSet,
ica.GetDestination().c_str(),
ica.GetPermissions().c_str(), ica.GetConfigurations(),
- ica.GetComponent().c_str(), fname.c_str(),
+ ica.GetComponent().c_str(), message, fname.c_str(),
name_space.GetCString(), exportOld.IsEnabled(), this->Makefile);
this->Makefile->AddInstallGenerator(exportGenerator);
diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx
index ddf7d08..8c13bab 100644
--- a/Source/cmInstallDirectoryGenerator.cxx
+++ b/Source/cmInstallDirectoryGenerator.cxx
@@ -21,9 +21,11 @@ cmInstallDirectoryGenerator
const char* dir_permissions,
std::vector<std::string> const& configurations,
const char* component,
+ MessageLevel message,
const char* literal_args,
bool optional):
- cmInstallGenerator(dest, configurations, component), Directories(dirs),
+ cmInstallGenerator(dest, configurations, component, message),
+ Directories(dirs),
FilePermissions(file_permissions), DirPermissions(dir_permissions),
LiteralArguments(literal_args), Optional(optional)
{
diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h
index d76ef3c..165ab91 100644
--- a/Source/cmInstallDirectoryGenerator.h
+++ b/Source/cmInstallDirectoryGenerator.h
@@ -26,6 +26,7 @@ public:
const char* dir_permissions,
std::vector<std::string> const& configurations,
const char* component,
+ MessageLevel message,
const char* literal_args,
bool optional = false);
virtual ~cmInstallDirectoryGenerator();
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 9a17052..ddfd6c5 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -32,10 +32,11 @@ cmInstallExportGenerator::cmInstallExportGenerator(
const char* file_permissions,
std::vector<std::string> const& configurations,
const char* component,
+ MessageLevel message,
const char* filename, const char* name_space,
bool exportOld,
cmMakefile* mf)
- :cmInstallGenerator(destination, configurations, component)
+ :cmInstallGenerator(destination, configurations, component, message)
,ExportSet(exportSet)
,FilePermissions(file_permissions)
,FileName(filename)
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index 37b5593..eb8c28b 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -30,6 +30,7 @@ public:
const char* dest, const char* file_permissions,
const std::vector<std::string>& configurations,
const char* component,
+ MessageLevel message,
const char* filename, const char* name_space,
bool exportOld, cmMakefile* mf);
~cmInstallExportGenerator();
diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx
index 7eabbef..1d648c9 100644
--- a/Source/cmInstallFilesCommand.cxx
+++ b/Source/cmInstallFilesCommand.cxx
@@ -132,11 +132,13 @@ void cmInstallFilesCommand::CreateInstallGenerator() const
std::string no_component = this->Makefile->GetSafeDefinition(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
std::vector<std::string> no_configurations;
+ cmInstallGenerator::MessageLevel message =
+ cmInstallGenerator::MessageDefault;
this->Makefile->AddInstallGenerator(
new cmInstallFilesGenerator(this->Makefile, this->Files,
destination.c_str(), false,
no_permissions, no_configurations,
- no_component.c_str(), no_rename));
+ no_component.c_str(), message, no_rename));
}
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index b2be82e..91b102a 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -23,9 +23,10 @@ cmInstallFilesGenerator
const char* file_permissions,
std::vector<std::string> const& configurations,
const char* component,
+ MessageLevel message,
const char* rename,
bool optional):
- cmInstallGenerator(dest, configurations, component),
+ cmInstallGenerator(dest, configurations, component, message),
Makefile(mf),
Files(files), Programs(programs),
FilePermissions(file_permissions),
diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h
index 23bf935..0dbd712 100644
--- a/Source/cmInstallFilesGenerator.h
+++ b/Source/cmInstallFilesGenerator.h
@@ -28,6 +28,7 @@ public:
const char* file_permissions,
std::vector<std::string> const& configurations,
const char* component,
+ MessageLevel message,
const char* rename,
bool optional = false);
virtual ~cmInstallFilesGenerator();
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 9370e48..0bc4073 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -17,10 +17,12 @@
cmInstallGenerator
::cmInstallGenerator(const char* destination,
std::vector<std::string> const& configurations,
- const char* component):
+ const char* component,
+ MessageLevel message):
cmScriptGenerator("CMAKE_INSTALL_CONFIG_NAME", configurations),
Destination(destination? destination:""),
- Component(component? component:"")
+ Component(component? component:""),
+ Message(message)
{
}
diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h
index c72e9e9..8e8db40 100644
--- a/Source/cmInstallGenerator.h
+++ b/Source/cmInstallGenerator.h
@@ -24,9 +24,15 @@ class cmLocalGenerator;
class cmInstallGenerator: public cmScriptGenerator
{
public:
+ enum MessageLevel
+ {
+ MessageDefault,
+ };
+
cmInstallGenerator(const char* destination,
std::vector<std::string> const& configurations,
- const char* component);
+ const char* component,
+ MessageLevel message);
virtual ~cmInstallGenerator();
void AddInstallRule(
@@ -58,6 +64,7 @@ protected:
// Information shared by most generator types.
std::string Destination;
std::string Component;
+ MessageLevel Message;
};
#endif
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index 597f7ee..18d7546 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -93,11 +93,13 @@ void cmInstallProgramsCommand::FinalPass()
std::string no_component = this->Makefile->GetSafeDefinition(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
std::vector<std::string> no_configurations;
+ cmInstallGenerator::MessageLevel message =
+ cmInstallGenerator::MessageDefault;
this->Makefile->AddInstallGenerator(
new cmInstallFilesGenerator(this->Makefile, this->Files,
destination.c_str(), true,
no_permissions, no_configurations,
- no_component.c_str(), no_rename));
+ no_component.c_str(), message, no_rename));
}
/**
diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx
index 1ecf021..933aa07 100644
--- a/Source/cmInstallScriptGenerator.cxx
+++ b/Source/cmInstallScriptGenerator.cxx
@@ -15,7 +15,7 @@
cmInstallScriptGenerator
::cmInstallScriptGenerator(const char* script, bool code,
const char* component) :
- cmInstallGenerator(0, std::vector<std::string>(), component),
+ cmInstallGenerator(0, std::vector<std::string>(), component, MessageDefault),
Script(script), Code(code)
{
}
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index ec2b518..85df91d 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -24,8 +24,10 @@ cmInstallTargetGenerator
::cmInstallTargetGenerator(cmTarget& t, const char* dest, bool implib,
const char* file_permissions,
std::vector<std::string> const& configurations,
- const char* component, bool optional):
- cmInstallGenerator(dest, configurations, component), Target(&t),
+ const char* component,
+ MessageLevel message,
+ bool optional):
+ cmInstallGenerator(dest, configurations, component, message), Target(&t),
ImportLibrary(implib), FilePermissions(file_permissions), Optional(optional)
{
this->ActionsPerConfig = true;
diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h
index d718dbc..7e5cc71 100644
--- a/Source/cmInstallTargetGenerator.h
+++ b/Source/cmInstallTargetGenerator.h
@@ -27,6 +27,7 @@ public:
const char* file_permissions,
std::vector<std::string> const& configurations,
const char* component,
+ MessageLevel message,
bool optional
);
virtual ~cmInstallTargetGenerator();
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2243834..ec89bde 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -3004,6 +3004,7 @@ public:
cmInstallTargetGeneratorLocal(cmTarget& t, const char* dest, bool implib):
cmInstallTargetGenerator(
t, dest, implib, "", std::vector<std::string>(), "Unspecified",
+ MessageDefault,
false) {}
};