some try compile fixes
This commit is contained in:
parent
f7ec3c2a76
commit
c9d16defb0
|
@ -43,7 +43,8 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(const char*,
|
||||||
int cmGlobalVisualStudio7Generator::TryCompile(const char *,
|
int cmGlobalVisualStudio7Generator::TryCompile(const char *,
|
||||||
const char *bindir,
|
const char *bindir,
|
||||||
const char *projectName,
|
const char *projectName,
|
||||||
const char *targetName)
|
const char *targetName,
|
||||||
|
std::string *output)
|
||||||
{
|
{
|
||||||
// now build the test
|
// now build the test
|
||||||
std::string makeCommand =
|
std::string makeCommand =
|
||||||
|
@ -61,8 +62,6 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
|
||||||
/**
|
/**
|
||||||
* Run an executable command and put the stdout in output.
|
* Run an executable command and put the stdout in output.
|
||||||
*/
|
*/
|
||||||
std::string output;
|
|
||||||
|
|
||||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
cmSystemTools::ChangeDirectory(bindir);
|
cmSystemTools::ChangeDirectory(bindir);
|
||||||
|
|
||||||
|
@ -77,7 +76,7 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
|
||||||
#endif
|
#endif
|
||||||
makeCommand += " ";
|
makeCommand += " ";
|
||||||
makeCommand += projectName;
|
makeCommand += projectName;
|
||||||
makeCommand += ".sln /rebuild Debug /project ";
|
makeCommand += ".sln /build Debug /project ";
|
||||||
if (targetName)
|
if (targetName)
|
||||||
{
|
{
|
||||||
makeCommand += targetName;
|
makeCommand += targetName;
|
||||||
|
@ -88,7 +87,8 @@ int cmGlobalVisualStudio7Generator::TryCompile(const char *,
|
||||||
}
|
}
|
||||||
|
|
||||||
int retVal;
|
int retVal;
|
||||||
if (!cmSystemTools::RunCommand(makeCommand.c_str(), output, retVal))
|
if (!cmSystemTools::RunCommand(makeCommand.c_str(), *output, retVal,
|
||||||
|
0, false))
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("Generator: execution of devenv failed.");
|
cmSystemTools::Error("Generator: execution of devenv failed.");
|
||||||
// return to the original directory
|
// return to the original directory
|
||||||
|
@ -571,3 +571,14 @@ std::string cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmGlobalVisualStudio7Generator::LocalGenerate()
|
||||||
|
{
|
||||||
|
// load the possible configuraitons
|
||||||
|
this->GenerateConfigurations();
|
||||||
|
this->cmGlobalGenerator::LocalGenerate();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
|
||||||
|
{
|
||||||
|
return &m_Configurations;
|
||||||
|
};
|
||||||
|
|
|
@ -48,7 +48,8 @@ public:
|
||||||
* loaded commands, not as part of the usual build process.
|
* loaded commands, not as part of the usual build process.
|
||||||
*/
|
*/
|
||||||
virtual int TryCompile(const char *srcdir, const char *bindir,
|
virtual int TryCompile(const char *srcdir, const char *bindir,
|
||||||
const char *projectName, const char *targetName);
|
const char *projectName, const char *targetName,
|
||||||
|
std::string *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the all required files for building this project/tree. This
|
* Generate the all required files for building this project/tree. This
|
||||||
|
@ -57,6 +58,13 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate the required files for building this directory. This
|
||||||
|
* basically creates a single LocalGenerators and
|
||||||
|
* requests that it Generate.
|
||||||
|
*/
|
||||||
|
virtual void LocalGenerate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the DSW workspace file.
|
* Generate the DSW workspace file.
|
||||||
*/
|
*/
|
||||||
|
@ -65,10 +73,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Get the list of configurations
|
* Get the list of configurations
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> *GetConfigurations()
|
std::vector<std::string> *GetConfigurations();
|
||||||
{
|
|
||||||
return &m_Configurations;
|
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetupTests();
|
void SetupTests();
|
||||||
|
|
Loading…
Reference in New Issue