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";
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

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

View File

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