1 #ifndef PROJECT_TREE_BUILDER__PROJ_ITEM__HPP 2 #define PROJECT_TREE_BUILDER__PROJ_ITEM__HPP 3 4 /* $Id: proj_item.hpp 575393 2018-11-28 16:02:09Z gouriano $ 5 * =========================================================================== 6 * 7 * PUBLIC DOMAIN NOTICE 8 * National Center for Biotechnology Information 9 * 10 * This software/database is a "United States Government Work" under the 11 * terms of the United States Copyright Act. It was written as part of 12 * the author's official duties as a United States Government employee and 13 * thus cannot be copyrighted. This software/database is freely available 14 * to the public for use. The National Library of Medicine and the U.S. 15 * Government have not placed any restriction on its use or reproduction. 16 * 17 * Although all reasonable efforts have been taken to ensure the accuracy 18 * and reliability of the software and data, the NLM and the U.S. 19 * Government do not and cannot warrant the performance or results that 20 * may be obtained by using this software or data. The NLM and the U.S. 21 * Government disclaim all warranties, express or implied, including 22 * warranties of performance, merchantability or fitness for any particular 23 * purpose. 24 * 25 * Please cite the author in any work or product based on this material. 26 * 27 * =========================================================================== 28 * 29 * Author: Viatcheslav Gorelenkov 30 * 31 */ 32 33 34 #include "msvc_prj_utils.hpp" 35 #include "proj_datatool_generated_src.hpp" 36 #include "file_contents.hpp" 37 38 #include <corelib/ncbienv.hpp> 39 #include <set> 40 41 42 BEGIN_NCBI_SCOPE 43 44 45 ///////////////////////////////////////////////////////////////////////////// 46 /// 47 /// CProjItem -- 48 /// 49 /// Project abstraction. 50 /// 51 /// Representation of one project from the build tree. 52 53 class CProjItem 54 { 55 public: 56 typedef CProjKey::TProjType TProjType; 57 58 59 CProjItem(void); 60 CProjItem(const CProjItem& item); 61 CProjItem& operator= (const CProjItem& item); 62 63 CProjItem(TProjType type, 64 const string& name, 65 const string& id, 66 const string& sources_base, 67 const list<string>& sources, 68 const list<CProjKey>& depends, 69 const list<string>& requires, 70 const list<string>& libs_3_party, 71 const list<string>& include_dirs, 72 const list<string>& defines, 73 EMakeFileType maketype, 74 const string& guid); 75 76 ~CProjItem(void); 77 78 string GetPath(void) const; 79 80 bool HasDataspecDependency(void) const; 81 82 /// Name of atomic project. 83 string m_Name; 84 85 /// ID of atomic project. 86 string m_ID; 87 88 /// Type of the project. 89 TProjType m_ProjType; 90 91 /// Base directory of source files (....c++/src/a/ ) 92 string m_SourcesBaseDir; 93 94 /// Precompiled header 95 string m_Pch; 96 97 /// List of source files without extension ( *.cpp or *.c ) - 98 /// with relative pathes from m_SourcesBaseDir. 99 list<string> m_Sources; 100 101 /// What projects this project is depend upon (IDs). 102 list<CProjKey> m_Depends; 103 set< CProjKey> m_UnconditionalDepends; 104 105 /// What this project requires to have (in user site). 106 list<string> m_Requires; 107 108 /// Resolved contents of LIBS flag (Third-party libs) 109 list<string> m_Libs3Party; 110 111 /// Resolved contents of CPPFLAG ( -I$(include)<m_IncludeDir> -I$(srcdir)/..) 112 /// Absolute pathes 113 list<string> m_IncludeDirs; 114 115 /// Source files *.asn , *.dtd to be processed by datatool app 116 list<CDataToolGeneratedSrc> m_DatatoolSources; 117 118 /// Defines like USE_MS_DBLIB 119 list<string> m_Defines; 120 121 /// Libraries from NCBI C Toolkit to link with 122 list<string> m_NcbiCLibs; 123 124 /// Type of the project 125 EMakeFileType m_MakeType; 126 127 /// project GUID 128 mutable string m_GUID; 129 130 string m_DllHost; 131 list<string> m_HostedLibs; 132 133 string m_ExportHeadersDest; 134 list<string> m_ExportHeaders; 135 136 string m_Watchers; 137 list<string> m_CheckInfo; 138 mutable set<string> m_CheckConfigs; 139 140 list<string> m_Includes; 141 list<string> m_Inlines; 142 map<string, list<string> > m_ExtraFiles; 143 list<string> m_ProjTags; 144 list<SCustomBuildInfo> m_CustomBuild; 145 146 mutable bool m_IsBundle; 147 bool m_IsMetallib; 148 bool m_External; 149 bool m_StyleObjcpp; 150 string m_MkName; 151 152 CSimpleMakeFileContents m_DataSource; 153 private: 154 void Clear(void); 155 void SetFrom(const CProjItem& item); 156 }; 157 158 159 END_NCBI_SCOPE 160 161 #endif //PROJECT_TREE_BUILDER__PROJ_ITEM__HPP 162