73 const string& proj_id,
76 return tree->m_Projects.find
88 list<CProjKey> new_depends;
91 const string& depend_id = p->Id();
103 new_depends.push_back(depend_key);
105 (
tree->m_Projects.find(depend_key))->second;
111 if (!dll_host.empty()) {
115 new_depends.push_back(depend_key);
117 (
tree->m_Projects.find(depend_key))->second;
123 new_depends.push_back(depend_key);
126 "Missing dependency: " << depend_id);
147 if (
GetApp().GetSite().GetChoiceForLib(lib.
m_ID)
166 const list<SConfigInfo> no_configs;
171 const string& rel_path = *p;
186 string abs_source_path = dir + base;
188 string new_rel_path =
203 const string& rel_path = *p;
214 const string& rel_path = *p;
226 for (
map<
string, list<string> >::const_iterator
g = extra.
begin();
g != extra.
end(); ++
g) {
227 const list<string>& lst(
g->second);
238 string new_rel_path =
254 if (
i->second.m_DllHost.empty()) {
308 string makefile_name =
315 list<string> ncbi_clibs;
323 copy(ncbi_clibs.begin(),
352 if (*h !=
key.Id()) {
353 i->second.m_DllHost =
key.Id();
358 }
else if (
i->second.m_DllHost.empty()) {
359 i->second.m_DllHost =
key.Id();
397 list<string> dll_ids;
400 list<string> dll_depends_ids;
402 copy(dll_depends_ids.begin(),
403 dll_depends_ids.end(), back_inserter(dll_ids));
407 ITERATE(list<string>, p, dll_ids) {
409 const string& dll_id = *p;
414 if (d ==
GetApp().GetWholeTree().m_Projects.end()) {
423 bool is_empty =
true;
426 const string& lib_id = *
n;
430 if (k !=
GetApp().GetWholeTree().m_Projects.end()) {
434 }
else if (
GetApp().GetSite().GetChoiceForLib(lib_id)
442 str_log +=
" " + lib_id;
452 if ( !str_log.empty() ) {
456 "Missing libraries not found: " << str_log);
462 "Skipped empty project: " << dll_id);
467 list<CProjKey> new_depends;
473 for (
int pass=0; !found && pass<2; ++pass) {
477 if (
i->second.m_DllHost.empty()) {
478 new_depends.push_back(depend_id);
483 if (pass == 1 &&
GetApp().m_AddMissingLibs &&
485 copy(
i->second.m_Depends.begin(),
i->second.m_Depends.end(),
486 back_inserter(new_depends));
490 const list<string>& lst = d->second.m_HostedLibs;
491 if ( find (lst.begin(), lst.end(), depend_id.
Id()) != lst.end()) {
492 new_depends.push_back(d->first);
502 if (
GetApp().m_AddMissingLibs) {
503 new_depends.push_back(depend_id);
506 "Depends on missing project: " << depend_id.
Id());
513 new_depends.unique();
520 list<string>* dll_ids)
527 if ( !p->second.m_DllHost.empty() ) {
528 dll_set.
insert(p->second.m_DllHost);
531 copy(dll_set.
begin(), dll_set.
end(), back_inserter(*dll_ids));
536 const list<string>& dll_ids,
537 list<string>* dll_depends_ids)
539 size_t depends_cnt = dll_depends_ids->size();
541 ITERATE(list<string>, p, dll_ids) {
543 const string& dll_id = *p;
547 ITERATE(list<CProjKey>,
n,
i->second.m_Depends) {
550 find(dll_ids.begin(), dll_ids.end(),
n->Id()) == dll_ids.end()) {
551 dll_depends_ids->push_back(
n->Id());
557 dll_depends_ids->sort();
558 dll_depends_ids->unique();
559 if ( !(dll_depends_ids->size() > depends_cnt) )
562 list<string> total_dll_ids(dll_ids);
563 copy(dll_depends_ids->begin(),
564 dll_depends_ids->end(), back_inserter(total_dll_ids));
565 total_dll_ids.sort();
566 total_dll_ids.unique();
void RegisterExtraFile(const string &inl_file_path, const CProjKey &dll_project_id, const CProjKey &lib_project_id)
void RegisterSource(const string &src_file_path, const CProjKey &dll_project_id, const CProjKey &lib_project_id)
void RegisterInline(const string &inl_file_path, const CProjKey &dll_project_id, const CProjKey &lib_project_id)
void RegisterHeader(const string &hrd_file_path, const CProjKey &dll_project_id, const CProjKey &lib_project_id)
static string GetVcprojExt(void)
static EMsvcPlatform GetMsvcPlatform(void)
const map< string, list< string > > GetExtraFiles(void) const
const list< string > & HeaderFiles(void) const
const list< string > & SourceFiles(void) const
const list< string > & InlineFiles(void) const
CMsvcPrjProjectContext –.
const string & ProjectDir(void) const
const list< SCustomBuildInfo > & GetCustomBuildInfo(void) const
const list< string > & IncludeDirsAbs(void) const
const list< string > & InlineDirsAbs(void) const
SLibChoice GetLibChoiceForLib(const string &lib_id) const
CDllSrcFilesDistr & GetDllFilesDistr(void)
const SProjectTreeInfo & GetProjectTreeInfo(void)
const CProjectItemsTree & GetWholeTree(void)
const CMsvcSite & GetSite(void)
list< string > m_Requires
What this project requires to have (in user site).
list< string > m_IncludeDirs
Resolved contents of CPPFLAG ( -I<m_IncludeDir> -I/..) Absolute pathes.
list< string > m_Sources
List of source files without extension ( *.cpp or *.c ) - with relative pathes from m_SourcesBaseDir.
list< CProjKey > m_Depends
What projects this project is depend upon (IDs).
list< CDataToolGeneratedSrc > m_DatatoolSources
Source files *.asn , *.dtd to be processed by datatool app.
EMakeFileType m_MakeType
Type of the project.
string m_ID
ID of atomic project.
list< string > m_Defines
Defines like USE_MS_DBLIB.
list< string > m_HostedLibs
list< string > m_Includes
list< string > m_NcbiCLibs
Libraries from NCBI C Toolkit to link with.
string m_Name
Name of atomic project.
list< string > m_Libs3Party
Resolved contents of LIBS flag (Third-party libs)
string m_SourcesBaseDir
Base directory of source files (....c++/src/a/ )
list< SCustomBuildInfo > m_CustomBuild
map< string, list< string > > m_ExtraFiles
const string & Id(void) const
TProjType Type(void) const
string m_RootSrc
Root directory of Project Tree.
CSimpleMakeFileContents –.
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
pre_order_iterator end() const
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)
Normalize a path.
static string CreateRelativePath(const string &path_from, const string &path_to)
Create a relative path between two points in the file system specified by their absolute paths.
static string ConcatPath(const string &first, const string &second)
Concatenate two parts of the path for the current OS.
static void SplitPath(const string &path, string *dir=0, string *base=0, string *ext=0)
Split a path string into its basic components.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
if(yy_accept[yy_current_state])
static bool s_IsInTree(CProjKey::TProjType proj_type, const string &proj_id, const CProjectItemsTree *tree)
static void s_AddProjItemToDll(const CProjectItemsTree &tree_src, const CProjItem &lib, CProjItem &dll)
void CreateDllsList(const CProjectItemsTree &tree_src, list< string > *dll_ids)
static void s_InitalizeDllProj(const string &dll_id, CProjItem *dll, const CProjectItemsTree &tree_src, CProjectItemsTree *tree_dst)
void CollectDllsDepends(const CProjectItemsTree &tree_src, const list< string > &dll_ids, list< string > *dll_depends_ids)
void FilterOutDllHostedProjects(const CProjectItemsTree &tree_src, CProjectItemsTree *tree_dst)
void AnalyzeDllData(CProjectItemsTree &tree)
void CreateDllBuildTree(const CProjectItemsTree &tree_src, CProjectItemsTree *tree_dst)
string GetDllHost(const CProjectItemsTree &tree, const string &lib)
const struct ncbi::grid::netcache::search::fields::KEY key
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
CProjBulderApp & GetApp(void)
access to App singleton
#define PTB_ERROR_EX(file, err_code, msg)
@ ePTB_ConfigurationError
#define PTB_WARNING_EX(file, err_code, msg)
static void CreateNcbiCToolkitLibs(const CSimpleMakeFileContents &makefile, list< string > *libs_list)
static bool IsConfigurableDefine(const string &define)
static string CreateMakeAppLibFileName(const string &base_dir, const string &projname, SMakeInInfo::TMakeinType type=SMakeInInfo::eUnknown)
string m_Compilers
<compilers> branch of tree
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)