Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------------------
- std::string cmCPackGenerator::GetPackageFileName(
- const std::string& packageFileNameTemplate)
- {
- std::string sep = std::string(GetOption("CPACK_SEPARATOR"));
- std::vector<std::string> templateVector;
- std::string tempPackageName;
- cmSystemTools::ExpandListArgument(packageFileNameTemplate, templateVector, true);
- for(std::vector<std::string>::const_iterator it = templateVector.begin();
- it != templateVector.end(); ++it)
- {
- if( *it == "CPACK_COMPONENT_NAME")
- continue;
- if( !tempPackageName.empty() )
- tempPackageName += sep;
- tempPackageName += std::string(GetOption((*it).c_str()));
- }
- return tempPackageName;
- }
- //----------------------------------------------------------------------
- std::string cmCPackGenerator::GetPackageFileName(
- const std::string& packageFileNameTemplate,
- const std::string& groupOrComponentName)
- {
- std::string sep = std::string(GetOption("CPACK_SEPARATOR"));
- bool noName = false;
- const char* noNameFor = GetOption("CPACK_COMPONENT_NONAME_FOR");
- if ( !noNameFor && groupOrComponentName == "Unspecified" )
- {
- noName = true;
- }
- else if ( noNameFor && groupOrComponentName == noNameFor)
- {
- noName = true;
- }
- if ( noName )
- return GetPackageFileName(packageFileNameTemplate);
- std::vector<std::string> templateVector;
- std::string tempPackageName;
- cmSystemTools::ExpandListArgument(packageFileNameTemplate, templateVector, true);
- for(std::vector<std::string>::const_iterator it = templateVector.begin();
- it != templateVector.end(); ++it)
- {
- if( !tempPackageName.empty() )
- tempPackageName += sep;
- if ( *it == "CPACK_COMPONENT_NAME" )
- {
- tempPackageName += groupOrComponentName;
- }else{
- tempPackageName += std::string(GetOption((*it).c_str()));
- }
- }
- return tempPackageName;
- }
Advertisement
Add Comment
Please, Sign In to add comment