summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-07-10 13:12:39 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-07-10 13:12:39 (GMT)
commit5c4208f50e30a601b0cddd238232ca3f0db833af (patch)
tree507f16e1f2c2dadd822ea586bd289a6708ad82bc /Source/cmGlobalVisualStudio10Generator.cxx
parent3199db4794722f3cfde50b364545517fcb4d370c (diff)
downloadCMake-5c4208f50e30a601b0cddd238232ca3f0db833af.zip
CMake-5c4208f50e30a601b0cddd238232ca3f0db833af.tar.gz
CMake-5c4208f50e30a601b0cddd238232ca3f0db833af.tar.bz2
ENH: only 5 failing tests for VS 10
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx61
1 files changed, 61 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index a0af05c..4127a6c 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -96,3 +96,64 @@ std::string cmGlobalVisualStudio10Generator::GetUserMacrosRegKeyBase()
{
return "Software\\Microsoft\\VisualStudio\\10.0\\vsmacros";
}
+
+
+std::string cmGlobalVisualStudio10Generator
+::GenerateBuildCommand(const char* makeProgram,
+ const char *projectName,
+ const char* additionalOptions, const char *targetName,
+ const char* config, bool ignoreErrors, bool)
+{
+ // Ingoring errors is not implemented in visual studio 6
+ (void) ignoreErrors;
+
+
+ // now build the test
+ std::string makeCommand
+ = cmSystemTools::ConvertToOutputPath(makeProgram);
+ std::string lowerCaseCommand = makeCommand;
+ cmSystemTools::LowerCase(lowerCaseCommand);
+
+ // if there are spaces in the makeCommand, assume a full path
+ // and convert it to a path with no spaces in it as the
+ // RunSingleCommand does not like spaces
+ if(makeCommand.find(' ') != std::string::npos)
+ {
+ cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand);
+ }
+ // msbuild.exe CxxOnly.sln /t:Build /p:Configuration=Debug /target:ALL_BUILD
+ if(!targetName || strlen(targetName) == 0)
+ {
+ targetName = "ALL_BUILD";
+ }
+ bool clean = false;
+ if ( targetName && strcmp(targetName, "clean") == 0 )
+ {
+ clean = true;
+ makeCommand += " ";
+ makeCommand += projectName;
+ makeCommand += ".sln ";
+ makeCommand += "/t:Clean ";
+ }
+ else
+ {
+ makeCommand += " ";
+ makeCommand += targetName;
+ makeCommand += ".vcxproj ";
+ }
+ makeCommand += "/p:Configuration=";
+ if(config && strlen(config))
+ {
+ makeCommand += config;
+ }
+ else
+ {
+ makeCommand += "Debug";
+ }
+ if ( additionalOptions )
+ {
+ makeCommand += " ";
+ makeCommand += additionalOptions;
+ }
+ return makeCommand;
+}