summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-11-13 20:59:40 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-11-13 20:59:40 (GMT)
commit20b7e6b22204b034d204252c0475f292e830ff61 (patch)
treec4e78c77f55addd507270a17ccd0b9255f01ec0f /Source
parent19b144bdbf1b582e4ad832247bdeee7017d26263 (diff)
downloadCMake-20b7e6b22204b034d204252c0475f292e830ff61.zip
CMake-20b7e6b22204b034d204252c0475f292e830ff61.tar.gz
CMake-20b7e6b22204b034d204252c0475f292e830ff61.tar.bz2
ENH: space fixes and add a status option to message command
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx1
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Source/cmMakefile.h2
-rw-r--r--Source/cmMessageCommand.cxx18
-rw-r--r--Source/cmMessageCommand.h4
5 files changed, 27 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 55dea6a..c89a4d6 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -924,6 +924,7 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
std::string flags;
std::string target = m_ExecutableOutputPath + name
+ cmSystemTools::GetExecutableExtension();
+ target = cmSystemTools::ConvertToOutputPath(target.c_str());
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
std::string depend = "$(";
depend += this->CreateMakeVariable(name, "_SRC_OBJS")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index bc8bf6b..5e8ec98 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1443,3 +1443,8 @@ bool cmMakefile::GetLocal() const
{
return m_LocalGenerator->GetGlobalGenerator()->GetCMakeInstance()->GetLocal();
}
+void cmMakefile::DisplayStatus(const char* message, float s)
+{
+ this->GetLocalGenerator()->GetGlobalGenerator()
+ ->GetCMakeInstance()->UpdateProgress(message, s);
+}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 2cba494..695243a 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -522,6 +522,8 @@ public:
//! Determine wether this is a local or global build.
bool GetLocal() const;
+ ///! Display progress or status message.
+ void DisplayStatus(const char*, float);
protected:
// add link libraries and directories to the target
void AddGlobalLinkInformation(const char* name, cmTarget& target);
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 0fa2e83..45c6dc9 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -30,11 +30,20 @@ bool cmMessageCommand::InitialPass(std::vector<std::string> const& argsIn)
std::vector<std::string>::const_iterator i = args.begin();
bool send_error = false;
+ bool status = false;
if (*i == "SEND_ERROR")
{
send_error = true;
++i;
}
+ else
+ {
+ if (*i == "STATUS")
+ {
+ status = true;
+ ++i;
+ }
+ }
for(;i != args.end(); ++i)
{
@@ -47,7 +56,14 @@ bool cmMessageCommand::InitialPass(std::vector<std::string> const& argsIn)
}
else
{
- cmSystemTools::Message(message.c_str());
+ if (status)
+ {
+ m_Makefile->DisplayStatus(message.c_str(), -1);
+ }
+ else
+ {
+ cmSystemTools::Message(message.c_str());
+ }
}
return true;
diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h
index 2d0fc38..a312edc 100644
--- a/Source/cmMessageCommand.h
+++ b/Source/cmMessageCommand.h
@@ -60,8 +60,8 @@ public:
virtual const char* GetFullDocumentation()
{
return
- "MESSAGE([SEND_ERROR] \"message to display\"...)\n"
- "The arguments are messages to display. If the first argument is SEND_ERROR then an error is raised.";
+ "MESSAGE([SEND_ERROR | STATUS] \"message to display\"...)\n"
+ "The arguments are messages to display. If the first argument is SEND_ERROR then an error is raised. If the first argument is STATUS then the message is diaplyed in the progress line for the GUI";
}
cmTypeMacro(cmMessageCommand, cmCommand);