diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-06 22:31:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:31 (GMT) |
commit | fabf1fbabb4fc67844d5b2210e70a9829a59ff23 (patch) | |
tree | 9e40776ac9efdcb7b674f2e25f1d47f74b3b7baf /Source/cmGlobalVisualStudio10Generator.cxx | |
parent | a6ae2ea72bc0d4149c2ff6118fcfd577e95c680d (diff) | |
download | CMake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.zip CMake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.tar.gz CMake-fabf1fbabb4fc67844d5b2210e70a9829a59ff23.tar.bz2 |
stringapi: Use strings in target name
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 6983ef9..1346e13 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -313,7 +313,7 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand( const char* makeProgram, const char* projectName, const char* projectDir, - const char* targetName, + const std::string& targetName, const char* config, bool fast, std::vector<std::string> const& makeOptions) @@ -369,25 +369,26 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand( makeCommand.push_back(makeProgramSelected); + std::string realTarget = targetName; // msbuild.exe CxxOnly.sln /t:Build /p:Configuration=Debug /target:ALL_BUILD - if(!targetName || strlen(targetName) == 0) + if(realTarget.empty()) { - targetName = "ALL_BUILD"; + realTarget = "ALL_BUILD"; } - if ( targetName && strcmp(targetName, "clean") == 0 ) + if ( realTarget == "clean" ) { makeCommand.push_back(std::string(projectName)+".sln"); makeCommand.push_back("/t:Clean"); } else { - std::string targetProject(targetName); + std::string targetProject(realTarget); targetProject += ".vcxproj"; if (targetProject.find('/') == std::string::npos) { // it might be in a subdir if (cmSlnProjectEntry const* proj = - slnData.GetProjectByName(targetName)) + slnData.GetProjectByName(realTarget)) { targetProject = proj->GetRelativePath(); cmSystemTools::ConvertToUnixSlashes(targetProject); |