NCBI C++ ToolKit
|
Search Toolkit Book for CMsvcPrjProjectContext
CMsvcPrjProjectContext –. More...
#include "msvc_project_context.hpp"
(Private to src/build-system/project_tree_builder
.)
Static Public Member Functions | |
static bool | IsRequiresOk (const CProjItem &prj, string *unmet) |
static const set< string > & | GetEnabledPackages (const string &config_name) |
static const set< string > & | GetDisabledPackages (const string &config_name) |
Private Member Functions | |
CMsvcPrjProjectContext (void) | |
CMsvcPrjProjectContext (const CMsvcPrjProjectContext &) | |
CMsvcPrjProjectContext & | operator= (const CMsvcPrjProjectContext &) |
void | CreateLibsList (list< string > *libs_list) const |
Private Attributes | |
string | m_ProjectName |
string | m_ProjectId |
string | m_AdditionalLibrarianOptions |
string | m_ProjectDir |
CProjItem::TProjType | m_ProjType |
list< string > | m_SourcesDirsAbs |
list< string > | m_IncludeDirsAbs |
list< string > | m_InlineDirsAbs |
list< string > | m_ProjectIncludeDirs |
list< string > | m_ProjectLibs |
unique_ptr< CMsvcProjectMakefile > | m_MsvcProjectMakefile |
unique_ptr< CMsvcCombinedProjectMakefile > | m_MsvcCombinedProjectMakefile |
string | m_SourcesBaseDir |
list< string > | m_Requires |
list< SCustomBuildInfo > | m_CustomBuildInfo |
list< string > | m_Defines |
list< CProjKey > | m_PreBuilds |
list< string > | m_NcbiCLibs |
EMakeFileType | m_MakeType |
string | m_StaticLibRoot |
string | m_DynamicLibRoot |
string | m_SrcRoot |
const CProjItem & | m_Project |
Static Private Attributes | |
static map< string, set< string > > | s_EnabledPackages |
static map< string, set< string > > | s_DisabledPackages |
Abstraction of MSVC project-specific context.
Project context provides project-specific information for project generation.
Definition at line 56 of file msvc_project_context.hpp.
Definition at line 51 of file msvc_project_context.cpp.
References CDirEntry::AddTrailingPathSeparator(), set< Key, Compare >::begin(), CDirEntry::ConcatPath(), copy(), CreateMsvcProjectMakefileName(), CreateProjectName(), CDirEntry::CreateRelativePath(), CProjKey::eDll, CBuildType::eDll, CMsvcSite::eLib, CProjKey::eMsvc, map_checker< Container >::end(), set< Key, Compare >::end(), ePTB_ProjectNotFound, map_checker< Container >::find(), Get(), GetApp(), CProjBulderApp::GetBuildRoot(), CProjBulderApp::GetCurrentBuildTree(), CMsvcCombinedProjectMakefile::GetCustomBuildInfo(), CDirEntry::GetDir(), GetDllHost(), CMsvcCombinedProjectMakefile::GetHeadersInInclude(), CMsvcCombinedProjectMakefile::GetHeadersInSrc(), CMsvcCombinedProjectMakefile::GetInlinesInInclude(), CMsvcCombinedProjectMakefile::GetInlinesInSrc(), CMsvcSite::GetLibInfo(), GetMsvcProjectMakefile(), CMsvc7RegSettings::GetMsvcSection(), CProjBulderApp::GetProjectTreeInfo(), CProjBulderApp::GetSite(), CMsvcSite::GetThirdPartyLibsToInstall(), i, CProjKey::Id(), set< Key, Compare >::insert(), SMakeProjectT::IsConfigurableDefine(), ITERATE, SProjectTreeInfo::m_Compilers, m_CustomBuildInfo, m_Defines, CProjItem::m_Defines, m_DynamicLibRoot, CProjItem::m_ID, CProjItem::m_IncludeDirs, m_IncludeDirsAbs, CProjItem::m_Includes, m_InlineDirsAbs, CProjItem::m_Inlines, CProjItem::m_Libs3Party, SLibInfo::m_Macro, m_MakeType, CProjItem::m_MakeType, m_MsvcProjectMakefile, m_NcbiCLibs, CProjItem::m_NcbiCLibs, m_PreBuilds, m_ProjectDir, m_ProjectId, m_ProjectIncludeDirs, m_ProjectLibs, m_ProjectName, CProjectItemsTree::m_Projects, m_ProjType, CProjItem::m_ProjType, m_Requires, CProjItem::m_Requires, CProjItem::m_Sources, m_SourcesBaseDir, CProjItem::m_SourcesBaseDir, m_SourcesDirsAbs, m_SrcRoot, m_StaticLibRoot, CProjItem::m_UnconditionalDepends, CDirEntry::NormalizePath(), PTB_WARNING_EX, CDirEntry::SplitPath(), and t.
|
private |
|
private |
string CMsvcPrjProjectContext::AdditionalIncludeDirectories | ( | const SConfigInfo & | cfg_info | ) | const |
Definition at line 298 of file msvc_project_context.cpp.
References CDirEntry::AddTrailingPathSeparator(), NStr::CompareNocase(), CDirEntry::ConcatPath(), CreateLibsList(), CDirEntry::CreateRelativePath(), Get(), CMsvcCombinedProjectMakefile::GetAdditionalIncludeDirs(), GetApp(), CProjBulderApp::GetIncompleteBuildTree(), CMsvcSite::GetLibInclude(), GetMsvcProjectMakefile(), CProjBulderApp::GetSite(), i, CSymResolver::IsDefine(), ITERATE, NStr::Join(), m_ProjectDir, m_ProjectIncludeDirs, m_SourcesBaseDir, m_SrcRoot, CDirEntry::NormalizePath(), and SameRootDirs().
Referenced by s_CreateCompilerTool(), and s_CreateResourceCompilerTool().
string CMsvcPrjProjectContext::AdditionalLibraryDirectories | ( | const SConfigInfo & | cfg_info | ) | const |
Definition at line 500 of file msvc_project_context.cpp.
References CDirEntry::AddTrailingPathSeparator(), CDirEntry::ConcatPath(), CreateLibsList(), CDirEntry::CreateRelativePath(), CBuildType::eDll, CMsvcSite::eLib, ePTB_FileNotFound, GetApp(), SConfigInfo::GetConfigFullName(), CMsvc7RegSettings::GetConfigNameKeyword(), CProjBulderApp::GetIncompleteBuildTree(), CProjBulderApp::GetSite(), SLibInfo::IsEmpty(), ITERATE, NStr::Join(), m_DynamicLibRoot, SLibInfo::m_LibPath, m_StaticLibRoot, ProjectDir(), PTB_WARNING_EX, and site.
Referenced by s_CreateLinkerTool().
string CMsvcPrjProjectContext::AdditionalLinkerOptions | ( | const SConfigInfo & | cfg_info | ) | const |
Definition at line 407 of file msvc_project_context.cpp.
References CDirEntry::ConcatPath(), copy(), CreateLibsList(), CProjKey::eDll, CProjKey::eLib, CMsvcSite::eLib, map_checker< Container >::end(), ePTB_FileNotFound, CMsvc7RegSettings::eUnix, CDirEntry::Exists(), map_checker< Container >::find(), GetApp(), SConfigInfo::GetConfigFullName(), CProjBulderApp::GetIncompleteBuildTree(), CMsvc7RegSettings::GetMsvcPlatform(), CDirEntry::GetName(), CProjBulderApp::GetSite(), i, CProjKey::Id(), SMakeProjectT::IsConfigurableDefine(), SLibInfo::IsEmpty(), ITERATE, NStr::Join(), CProjItem::m_Depends, m_DynamicLibRoot, SLibInfo::m_LibPath, SLibInfo::m_Libs, m_NcbiCLibs, m_Project, CProjectItemsTree::m_Projects, m_StaticLibRoot, SLibInfo::m_StdLibs, n, PTB_ERROR_EX, PTB_WARNING_EX, site, and CProjKey::Type().
Referenced by s_CreateLinkerTool().
|
private |
Definition at line 559 of file msvc_project_context.cpp.
References copy(), GetApp(), CMsvcSite::GetComponents(), CProjBulderApp::GetSite(), ITERATE, m_ProjectLibs, m_Requires, and MSVC_DEFAULT_LIBS_TAG.
Referenced by AdditionalIncludeDirectories(), AdditionalLibraryDirectories(), AdditionalLinkerOptions(), and Defines().
const list< string > CMsvcPrjProjectContext::Defines | ( | const SConfigInfo & | cfg_info | ) | const |
Definition at line 711 of file msvc_project_context.cpp.
References copy(), CreateLibsList(), CMsvcSite::eLib, GetApp(), CMsvcSite::GetLibInfo(), CProjBulderApp::GetSite(), ITERATE, m_Defines, and SLibInfo::m_LibDefines.
Referenced by s_CreateCompilerTool().
string CMsvcPrjProjectContext::GetConfigData | ( | const string & | section, |
const string & | entry, | ||
const SConfigInfo & | config | ||
) | const |
Definition at line 767 of file msvc_project_context.cpp.
References GetApp(), CMsvcMetaMakefile::GetConfigOpt(), CProjBulderApp::GetMetaMakefile(), m_MsvcProjectMakefile, CProjItem::m_Pch, m_Project, NStr::StringToBool(), and rapidjson::value.
Referenced by IsPchEnabled().
|
inline |
Definition at line 120 of file msvc_project_context.hpp.
References m_CustomBuildInfo.
Referenced by s_AddProjItemToDll().
|
inlinestatic |
Definition at line 143 of file msvc_project_context.hpp.
References s_DisabledPackages.
Referenced by CreateConfigurableFile(), and CProjBulderApp::CreateFeaturesAndPackagesFiles().
|
inlinestatic |
Definition at line 139 of file msvc_project_context.hpp.
References s_EnabledPackages.
Referenced by CreateConfigurableFile(), and CProjBulderApp::CreateFeaturesAndPackagesFiles().
|
inline |
Definition at line 134 of file msvc_project_context.hpp.
References m_MakeType.
Referenced by CMsvcTools::CMsvcTools().
const CMsvcCombinedProjectMakefile & CMsvcPrjProjectContext::GetMsvcProjectMakefile | ( | void | ) | const |
Definition at line 580 of file msvc_project_context.cpp.
References CDirEntry::ConcatPath(), GetApp(), CProjBulderApp::GetProjectTreeInfo(), SProjectTreeInfo::m_Compilers, m_MsvcCombinedProjectMakefile, m_MsvcProjectMakefile, m_ProjType, and m_Requires.
Referenced by AdditionalIncludeDirectories(), CMsvcPrjProjectContext(), CMsvcPrjFilesCollector::CollectExtra(), CMsvcPrjFilesCollector::CollectResources(), CMsvcPrjFilesCollector::CollectSources(), PIsExcludedByProjectMakefile::operator()(), s_CreateCompilerTool(), s_CreateConfiguration(), s_CreateLibrarianTool(), s_CreateLinkerTool(), and s_CreateResourceCompilerTool().
string CMsvcPrjProjectContext::GetPchHeader | ( | const string & | project_id, |
const string & | source_file_full_path, | ||
const string & | tree_src_dir, | ||
const SConfigInfo & | config | ||
) | const |
Definition at line 746 of file msvc_project_context.cpp.
References GetApp(), CProjBulderApp::GetMetaMakefile(), CMsvcMetaMakefile::GetUsePchThroughHeader(), m_MsvcProjectMakefile, CProjItem::m_Pch, m_Project, NStr::StringToBool(), and rapidjson::value.
Definition at line 147 of file msvc_project_context.hpp.
References m_SrcRoot.
Definition at line 100 of file msvc_project_context.hpp.
References m_IncludeDirsAbs.
Referenced by CMsvcPrjFilesCollector::CollectHeaders(), and s_AddProjItemToDll().
Definition at line 105 of file msvc_project_context.hpp.
References m_InlineDirsAbs.
Referenced by CMsvcPrjFilesCollector::CollectInlines(), and s_AddProjItemToDll().
bool CMsvcPrjProjectContext::IsConfigEnabled | ( | const SConfigInfo & | config, |
string * | unmet, | ||
string * | unmet_req | ||
) | const |
Definition at line 619 of file msvc_project_context.cpp.
References copy(), GetApp(), CMsvcSite::GetComponents(), CProjBulderApp::GetSite(), map_checker< Container >::insert(), SLibInfo::IsEmpty(), ITERATE, m_ProjectLibs, m_Requires, result, SConfigInfo::rtSingleThreaded, SConfigInfo::rtSingleThreadedDebug, s_DisabledPackages, s_EnabledPackages, site, and st().
bool CMsvcPrjProjectContext::IsPchEnabled | ( | const SConfigInfo & | config | ) | const |
Definition at line 737 of file msvc_project_context.cpp.
References GetConfigData(), NStr::StringToBool(), and rapidjson::value.
Definition at line 603 of file msvc_project_context.cpp.
References GetApp(), ITERATE, and CProjItem::m_Requires.
Referenced by PIsExcludedByRequires::operator()().
|
private |
Definition at line 129 of file msvc_project_context.hpp.
References m_PreBuilds.
Referenced by CMsvcTools::CMsvcTools().
Definition at line 85 of file msvc_project_context.hpp.
References m_ProjectDir.
Referenced by AdditionalLibraryDirectories(), CMsvcPrjGeneralContext::CMsvcPrjGeneralContext(), CMsvcPrjFilesCollector::CollectExtra(), CMsvcPrjFilesCollector::CollectHeaders(), CMsvcPrjFilesCollector::CollectInlines(), CMsvcPrjFilesCollector::CollectResources(), CMsvcPrjFilesCollector::CollectSources(), and s_AddProjItemToDll().
Definition at line 69 of file msvc_project_context.hpp.
References m_ProjectId.
Referenced by s_CreateCompilerTool(), s_CreateLibrarianTool(), and s_CreateLinkerTool().
Definition at line 65 of file msvc_project_context.hpp.
References m_ProjectName.
|
inline |
Definition at line 90 of file msvc_project_context.hpp.
References m_ProjType.
Referenced by CMsvcPrjGeneralContext::CMsvcPrjGeneralContext(), and CMsvcTools::CMsvcTools().
Definition at line 95 of file msvc_project_context.hpp.
References m_SourcesDirsAbs.
|
private |
Definition at line 169 of file msvc_project_context.hpp.
|
private |
Definition at line 190 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and GetCustomBuildInfo().
|
private |
Definition at line 192 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and Defines().
|
private |
Definition at line 201 of file msvc_project_context.hpp.
Referenced by AdditionalLibraryDirectories(), AdditionalLinkerOptions(), and CMsvcPrjProjectContext().
|
private |
Definition at line 176 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and IncludeDirsAbs().
|
private |
Definition at line 177 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and InlineDirsAbs().
|
private |
Definition at line 198 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and GetMakeType().
|
private |
Definition at line 185 of file msvc_project_context.hpp.
Referenced by GetMsvcProjectMakefile().
|
private |
Definition at line 184 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), GetConfigData(), GetMsvcProjectMakefile(), and GetPchHeader().
|
private |
Definition at line 196 of file msvc_project_context.hpp.
Referenced by AdditionalLinkerOptions(), and CMsvcPrjProjectContext().
|
private |
Definition at line 194 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and PreBuilds().
Definition at line 203 of file msvc_project_context.hpp.
Referenced by AdditionalLinkerOptions(), GetConfigData(), and GetPchHeader().
|
private |
Definition at line 171 of file msvc_project_context.hpp.
Referenced by AdditionalIncludeDirectories(), CMsvcPrjProjectContext(), and ProjectDir().
|
private |
Definition at line 167 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and ProjectId().
|
private |
Definition at line 179 of file msvc_project_context.hpp.
Referenced by AdditionalIncludeDirectories(), and CMsvcPrjProjectContext().
|
private |
Definition at line 180 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), CreateLibsList(), and IsConfigEnabled().
|
private |
Definition at line 166 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and ProjectName().
|
private |
Definition at line 173 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), GetMsvcProjectMakefile(), and ProjectType().
|
private |
Definition at line 188 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), CreateLibsList(), GetMsvcProjectMakefile(), and IsConfigEnabled().
|
private |
Definition at line 187 of file msvc_project_context.hpp.
Referenced by AdditionalIncludeDirectories(), and CMsvcPrjProjectContext().
|
private |
Definition at line 175 of file msvc_project_context.hpp.
Referenced by CMsvcPrjProjectContext(), and SourcesDirsAbs().
|
private |
Definition at line 202 of file msvc_project_context.hpp.
Referenced by AdditionalIncludeDirectories(), CMsvcPrjProjectContext(), and GetSrcRoot().
|
private |
Definition at line 200 of file msvc_project_context.hpp.
Referenced by AdditionalLibraryDirectories(), AdditionalLinkerOptions(), and CMsvcPrjProjectContext().
Definition at line 206 of file msvc_project_context.hpp.
Referenced by GetDisabledPackages(), and IsConfigEnabled().
Definition at line 205 of file msvc_project_context.hpp.
Referenced by GetEnabledPackages(), and IsConfigEnabled().