ENH: fix for vs ide

This commit is contained in:
Bill Hoffman 2007-02-16 16:45:47 -05:00
parent ca0230a33e
commit fad49c8724
3 changed files with 19 additions and 3 deletions

View File

@ -1962,3 +1962,17 @@ GetTargetObjectFileDirectories(cmTarget* target,
std::cerr << dir << "\n"; std::cerr << dir << "\n";
dirs.push_back(dir); dirs.push_back(dir);
} }
// return the source name for the object file
std::string cmLocalVisualStudio7Generator::GetSourceObjectName(cmSourceFile& sf )
{
std::string ret = sf.GetSourceName();
std::string::size_type pos = ret.find("/");
if(pos == ret.npos)
{
return ret;
}
return ret.substr(pos+1);
}

View File

@ -68,7 +68,9 @@ public:
virtual void ConfigureFinalPass(); virtual void ConfigureFinalPass();
void GetTargetObjectFileDirectories(cmTarget* target, void GetTargetObjectFileDirectories(cmTarget* target,
std::vector<std::string>& std::vector<std::string>&
dirs); dirs);
// return the source name for the object file
virtual std::string GetSourceObjectName(cmSourceFile& );
private: private:
typedef cmLocalVisualStudio7GeneratorOptions Options; typedef cmLocalVisualStudio7GeneratorOptions Options;

View File

@ -25,11 +25,11 @@ int main()
} }
if(car() == 30) if(car() == 30)
{ {
printf("bar is 30!\n"); printf("car is 30!\n");
} }
else else
{ {
printf("bar is not 30 error!\n"); printf("car is not 30 error!\n");
return -1; return -1;
} }
printf("Test past\n"); printf("Test past\n");