summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-02-22 14:12:10 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-02-22 14:12:10 (GMT)
commit4d30cb309cc0cd191e89a7969599b79dea111a08 (patch)
treebf13c85d5880e0dca26c24240dbc17e267a2ec7e /Source/cmGlobalVisualStudio6Generator.cxx
parent832fa0e6091c5c574fc60bfd67e0cf982c3b33d8 (diff)
downloadCMake-4d30cb309cc0cd191e89a7969599b79dea111a08.zip
CMake-4d30cb309cc0cd191e89a7969599b79dea111a08.tar.gz
CMake-4d30cb309cc0cd191e89a7969599b79dea111a08.tar.bz2
ENH: ctest now uses CMake global generator to do the build part of build-and-test
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx33
1 files changed, 21 insertions, 12 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index aa17ed9..7dd412d 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -67,21 +67,23 @@ void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf)
}
}
-int cmGlobalVisualStudio6Generator::TryCompile(const char *,
- const char *bindir,
- const char *projectName,
- const char *targetName,
- std::string *output,
- cmMakefile* mf)
+int cmGlobalVisualStudio6Generator::Build(
+ const char *,
+ const char *bindir,
+ const char *projectName,
+ const char *targetName,
+ std::string *output,
+ const char *makeCommandCSTR,
+ const char *config,
+ bool clean)
{
// now build the test
- std::string makeCommand =
- m_CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM");
std::vector<std::string> mp;
mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin");
cmSystemTools::ExpandRegistryValues(mp[0]);
- std::string originalCommand = makeCommand;
- makeCommand = cmSystemTools::FindProgram(makeCommand.c_str(), mp);
+ std::string originalCommand = makeCommandCSTR;
+ std::string makeCommand =
+ cmSystemTools::FindProgram(makeCommandCSTR, mp);
if(makeCommand.size() == 0)
{
std::string e = "Generator cannot find Visual Studio 6 msdev program \"";
@@ -119,7 +121,7 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
makeCommand += "ALL_BUILD";
}
makeCommand += " - ";
- if(const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"))
+ if(config)
{
makeCommand += config;
}
@@ -127,7 +129,14 @@ int cmGlobalVisualStudio6Generator::TryCompile(const char *,
{
makeCommand += "Debug";
}
- makeCommand += "\"";
+ if(clean)
+ {
+ makeCommand += "\" /REBUILD";
+ }
+ else
+ {
+ makeCommand += "\" /BUILD";
+ }
int retVal;
int timeout = cmGlobalGenerator::s_TryCompileTimeout;
if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output,