parent
93032953af
commit
ddb517d014
|
@ -4,14 +4,31 @@
|
||||||
#include "cmSourceFile.h"
|
#include "cmSourceFile.h"
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
|
|
||||||
|
# include <cmsys/Terminal.h>
|
||||||
|
|
||||||
#include "cmQtAutomoc.h"
|
#include "cmQtAutomoc.h"
|
||||||
|
|
||||||
|
|
||||||
cmQtAutomoc::cmQtAutomoc()
|
cmQtAutomoc::cmQtAutomoc()
|
||||||
:Verbose(cmsys::SystemTools::GetEnv("VERBOSE") != 0)
|
:Verbose(cmsys::SystemTools::GetEnv("VERBOSE") != 0)
|
||||||
|
,ColorOutput(true)
|
||||||
,RunMocFailed(false)
|
,RunMocFailed(false)
|
||||||
,GenerateAll(false)
|
,GenerateAll(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
std::string colorEnv = "";
|
||||||
|
cmsys::SystemTools::GetEnv("COLOR", colorEnv);
|
||||||
|
if(!colorEnv.empty())
|
||||||
|
{
|
||||||
|
if(cmSystemTools::IsOn(colorEnv.c_str()))
|
||||||
|
{
|
||||||
|
this->ColorOutput = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->ColorOutput = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -678,14 +695,11 @@ bool cmQtAutomoc::GenerateMoc(const std::string& sourceFile,
|
||||||
cmsys::SystemTools::MakeDirectory(mocDir.c_str());
|
cmsys::SystemTools::MakeDirectory(mocDir.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (this->Verbose)
|
std::string msg = "Generating ";
|
||||||
{
|
msg += mocFileName;
|
||||||
echoColor("Generating " + mocFilePath + " from " + sourceFile);
|
cmSystemTools::MakefileColorEcho(cmsysTerminal_Color_ForegroundBlue
|
||||||
}
|
|cmsysTerminal_Color_ForegroundBold,
|
||||||
else
|
msg.c_str(), true, this->ColorOutput);
|
||||||
{
|
|
||||||
echoColor("Generating " + mocFileName);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
std::vector<cmStdString> command;
|
std::vector<cmStdString> command;
|
||||||
command.push_back(this->MocExecutable);
|
command.push_back(this->MocExecutable);
|
||||||
|
|
|
@ -61,6 +61,7 @@ private:
|
||||||
std::list<std::string> MocDefinitions;
|
std::list<std::string> MocDefinitions;
|
||||||
|
|
||||||
bool Verbose;
|
bool Verbose;
|
||||||
|
bool ColorOutput;
|
||||||
bool RunMocFailed;
|
bool RunMocFailed;
|
||||||
bool GenerateAll;
|
bool GenerateAll;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue