diff options
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 6f2dd65..94d2091 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -32,10 +32,12 @@ static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target, } static cmInstallFilesGenerator* CreateInstallFilesGenerator( + cmMakefile* mf, const std::vector<std::string>& absFiles, const cmInstallCommandArguments& args, bool programs) { - return new cmInstallFilesGenerator(absFiles, args.GetDestination().c_str(), + return new cmInstallFilesGenerator(mf, + absFiles, args.GetDestination().c_str(), programs, args.GetPermissions().c_str(), args.GetConfigurations(), args.GetComponent().c_str(), args.GetRename().c_str(), args.GetOptional()); @@ -95,7 +97,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args, } // Unknown mode. - cmStdString e = "called with unknown mode "; + std::string e = "called with unknown mode "; e += args[0]; this->SetError(e.c_str()); return false; @@ -668,7 +670,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) if (!privateHeaderArgs.GetDestination().empty()) { privateHeaderGenerator = - CreateInstallFilesGenerator(absFiles, privateHeaderArgs, false); + CreateInstallFilesGenerator(this->Makefile, absFiles, + privateHeaderArgs, false); } else { @@ -694,7 +697,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) if (!publicHeaderArgs.GetDestination().empty()) { publicHeaderGenerator = - CreateInstallFilesGenerator(absFiles, publicHeaderArgs, false); + CreateInstallFilesGenerator(this->Makefile, absFiles, + publicHeaderArgs, false); } else { @@ -719,8 +723,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) // Create the files install generator. if (!resourceArgs.GetDestination().empty()) { - resourceGenerator = CreateInstallFilesGenerator(absFiles, - resourceArgs, false); + resourceGenerator = CreateInstallFilesGenerator( + this->Makefile, absFiles, resourceArgs, false); } else { @@ -888,7 +892,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args) // Create the files install generator. this->Makefile->AddInstallGenerator( - CreateInstallFilesGenerator(absFiles, ica, programs)); + CreateInstallFilesGenerator(this->Makefile, absFiles, ica, programs)); //Tell the global generator about any installation component names specified. this->Makefile->GetLocalGenerator()->GetGlobalGenerator() @@ -1351,7 +1355,8 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName, ++fileIt) { std::string file = (*fileIt); - if(!cmSystemTools::FileIsFullPath(file.c_str())) + std::string::size_type gpos = cmGeneratorExpression::Find(file); + if(gpos != 0 && !cmSystemTools::FileIsFullPath(file.c_str())) { file = this->Makefile->GetCurrentDirectory(); file += "/"; @@ -1359,7 +1364,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName, } // Make sure the file is not a directory. - if(cmSystemTools::FileIsDirectory(file.c_str())) + if(gpos == file.npos && cmSystemTools::FileIsDirectory(file.c_str())) { cmOStringStream e; e << modeName << " given directory \"" << (*fileIt) << "\" to install."; |