77 list<string> not_provided;
79 ITERATE (list<string>, it, not_provided) {
87 list<string> not_provided;
89 ITERATE (list<string>, it, not_provided) {
95 if (!unix_cfg.empty()) {
99 GetApp().GetConfig().
Get(
"ProjectTree",
"src")),
101 if (!
CFile(fileloc).Exists() && !
GetApp().m_ExtSrcRoot.empty()) {
104 GetApp().GetConfig().
Get(
"ProjectTree",
"src")),
107 if (
CFile(fileloc).Exists()) {
115 if (!unix_cfg.empty()) {
117 if (!
GetApp().m_BuildRoot.empty()) {
120 if (fileloc.empty() || !
CFile(fileloc).Exists()) {
123 if (
CFile(fileloc).Exists()) {
132 string name = (*f)->GetBase();
133 if (name[0] ==
'-') {
134 name = name.substr(1);
148 list<string> comp_choices;
153 ITERATE(list<string>, p, comp_choices) {
154 const string& choice_str = *p;
156 string lib_3party_id;
164 "ComponentChoices: " << choice_str);
170 ITERATE(list<string>, p, comp_choices) {
171 const string& choice_str = *p;
173 string lib_3party_id;
181 "ComponentChoices: " << choice_str);
188 list<string> lib_choices_list;
190 ITERATE(list<string>, p, lib_choices_list) {
191 const string& choice_str = *p;
193 string lib_3party_id;
198 "Invalid LibChoices definition: " << choice_str);
208 if (thing[0] ==
'-') {
218 string section(
"__EnabledUserRequests");
219 if (
GetApp().m_CustomConfiguration.DoesValueContain(
220 section, thing,
false)) {
227 if (!
value.empty()) {
241 list<string> components;
243 if (components.empty()) {
244 components.push_back(thing);
246 if (cfg !=
nullptr) {
248 ITERATE(list<string>, p, components) {
249 const string& component = *p;
258 ITERATE(list<string>, p, components) {
259 const string& component = *p;
278 return !thing.empty() &&
291 list<string>* components)
const
299 string data(raw_data), raw_macro, macro, definition;
300 string::size_type start, end,
done = 0;
301 while ((start = data.find(
"$(",
done)) != string::npos) {
302 end = data.find(
")", start);
303 if (end == string::npos) {
305 "Malformatted macro definition: " + raw_data);
308 raw_macro = data.substr(start,end-start+1);
311 if (macro ==
"incdir") {
313 }
else if (macro ==
"rootdir") {
316 if (!
GetApp().m_CustomConfiguration.GetValue(macro,definition)) {
320 if (definition.empty() && preserve_unresolved) {
336 string libinfokey(lib +
"|" +
config.GetConfigFullName());
340 *libinfo = li->second;
354 if (!libinfo->
valid) {
388 PTB_INFO(
"Component " << libinfokey <<
": " << (libinfo->
m_good ?
"good" :
"bad"));
404 string enabled_configs_str =
m_Registry.
Get(section,
"CONFS");
405 if (enabled_configs_str.empty()) {
408 list<string> enabled_configs;
412 return find(enabled_configs.begin(),
413 enabled_configs.end(),
414 config.m_Name) != enabled_configs.end();
427 if (resolved.empty()) {
433 list<string> lst, res;
435 ITERATE(list<string>, l, lst) {
438 if (!resolved.empty()) {
439 res.push_back(resolved);
478 list_enabled.push_back(req);
480 list_disabled.push_back(req);
499 if (lib_id == choice.
m_LibId) {
525 const string& lib_3party)
527 m_3PartyLib(lib_3party)
535 ITERATE(list<SConfigInfo>, p,
GetApp().GetRegSettings().m_ConfigInfo) {
540 if ( !
site.IsLibOk(lib_info) ) {
564 const string& lib3party_id,
const SConfigInfo& cfg_info)
const
573 GetLibInfo(lib3party_id, cfg_info, &lib_info);
583 const string& cpp_flags_define, list<string>* abs_includes)
const
585 abs_includes->clear();
589 if (!include_str.empty()) {
590 abs_includes->push_back(
"$(" + cpp_flags_define +
")");
595 const string& cpp_flags_define,
const SConfigInfo& cfg_info,
596 list<string>* abs_includes)
const
598 abs_includes->clear();
606 ITERATE(list<string>, p, parts) {
607 if ( lib_id.empty() )
616 if (lib_id ==
"lzo") {
624 lib_info.
m_IncludeDir.end(), back_inserter(*abs_includes));
626 const string& rel_include_path = *p;
628 string abs_include_path =
633 abs_includes->push_back(abs_include_path);
642 const SConfigInfo& cfg_info, list<string>* includes)
const
651 if (
IsLibOk(lib_info,
true) ) {
660 <<
" unavailable: library include ignored: "
789 const string&
type,
const string&
orig)
const
791 string section(
"PlatformSynonyms_");
834 if ( !lib_info.
valid )
842 "INCLUDE path not found");
853 "LIB path not found");
864 if ( !lib_path_abs.empty() &&
869 "LIB path not found");
878 const string& lib = *p;
880 if ( !lib_path_abs.empty() &&
884 "LIB path not found");
891 if ( !lib_info.
m_Files.empty()) {
892 bool group_exists =
false;
896 bool file_exists =
true;
920 group_exists = group_exists || file_exists;
935 ITERATE(list<string>, m, macros) {
936 const string& macro = *m;
941 list<string> components;
944 ITERATE(list<string>, p, components) {
945 const string& component = *p;
947 ITERATE(list<SConfigInfo>,
n, configs) {
956 <<
" cannot be resolved for "
957 << component <<
"|" <<
config.GetConfigFullName());
985 for (
size_t i = 0;
i < xpath.length();
i++) {
987 if ( (c ==
'\\' || c ==
'/') && c != separator) {
988 xpath[
i] = separator;
static EMsvcPlatform GetMsvcPlatform(void)
static string GetMsvcSection(void)
static string GetMsvcRegSection(void)
ELibChoice GetChoiceForLib(const string &lib_id) const
bool IsDescribed(const string §ion) const
Is section present in site registry?
bool IsLibWithChoice(const string &lib_id) const
void GetLibInclude(const string &lib_id, const SConfigInfo &cfg_info, list< string > *includes) const
void SetThirdPartyLibBin(const string &lib, const string &bin)
static TDirectoryExistenceMap sm_DirExists
map< string, SLibInfo > m_AllLibInfo
string GetThirdPartyLibBin(const string &lib) const
void GetStandardFeatures(list< string > &features) const
CSimpleMakeFileContents m_UnixMakeDef
CMsvcSite(void)
Prohibited to:
string GetThirdPartyLibsBinSubDir(void) const
bool IsLibEnabledInConfig(const string &lib, const SConfigInfo &config) const
string GetAppDefaultResource(void) const
void CollectRequires(const list< string > &reqs) const
set< string > m_NotProvidedThing
SLibChoice GetLibChoiceFor3PartyLib(const string &lib3party_id) const
map< string, string > m_ThirdPartyLibBin
string x_GetDefinesEntry(const string &entry) const
string GetDefinesEntry(const string &entry) const
void GetThirdPartyLibsToInstall(list< string > *libs) const
string GetPlatformInfo(const string &sysname, const string &type, const string &orig) const
bool IsLibOk(const SLibInfo &lib_info, bool silent=false) const
static string ToOSPath(const string &path)
string x_GetConfigureEntry(const string &entry) const
string GetConfigureDefinesPath(void) const
string ProcessMacros(string data, bool preserve_unresolved=true) const
void GetRequiresInfo(const SConfigInfo &config, list< string > &list_enabled, list< string > &list_disabled) const
bool IsProvided(const string &thing, bool deep=true, const SConfigInfo *cfg=nullptr) const
set< string > m_ProvidedThing
void GetLibInfo(const string &lib, const SConfigInfo &config, SLibInfo *libinfo) const
list< SLibChoice > m_LibChoices
bool IsCppflagDescribed(const string &value) const
ELibChoice GetChoiceFor3PartyLib(const string &lib3party_id, const SConfigInfo &cfg_info) const
bool ResolveDefine(const string &define, string &resolved) const
string GetThirdPartyLibsBinPathSuffix(void) const
static bool x_DirExists(const string &dir_name)
bool Is3PartyLib(const string &lib_id) const
void InitializeLibChoices(void)
void GetConfigureDefines(list< string > *defines) const
string GetConfigureEntry(const string &entry) const
void GetComponents(const string &entry, list< string > *components) const
Get components from site.
bool Is3PartyLibWithChoice(const string &lib3party_id) const
void GetLibChoiceIncludes(const string &cpp_flags_define, list< string > *abs_includes) const
bool IsBanned(const string &thing) const
void GetConfigurableRequests(list< string > &features) const
SLibChoice GetLibChoiceForLib(const string &lib_id) const
CSimpleMakeFileContents m_CustomConfiguration
const SProjectTreeInfo & GetProjectTreeInfo(void)
bool HasEntry(const string §ion, const string &name=kEmptyStr) const
void Read(CNcbiIstream &is)
string Get(const string §ion, const string &name) const
static void LoadFrom(const string &file_path, CSimpleMakeFileContents *fc)
void AddDefinition(const string &key, const string &value)
bool GetValue(const string &key, string &value) const
void SetValueSeparator(const string &sep)
void AddDefinition(const string &key, const string &value)
static string StripDefine(const string &define)
static bool IsDefine(const string ¶m)
container_type::iterator iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
The NCBI C++ standard methods for dealing with std::string.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)
Normalize a path.
TEntries GetEntries(const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const
Get directory entries based on the specified "mask".
static bool IsAbsolutePath(const string &path)
Check if a "path" is absolute for the current OS.
virtual bool Exists(void) const
Check the entry existence.
static string ConvertToOSPath(const string &path)
Convert "path" on any OS to the current OS-dependent path.
static char GetPathSeparator(void)
Get path separator symbol specific for the current platform.
static string ConcatPath(const string &first, const string &second)
Concatenate two parts of the path for the current OS.
string g_GetConfigString(const char *section, const char *variable, const char *env_var_name, const char *default_value, CParamBase::EParamSource *src=nullptr)
Helper functions for getting values from registry/environment.
bool g_GetConfigFlag(const char *section, const char *variable, const char *env_var_name, bool default_value)
Get boolean configuration value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is provided
#define LIST_SEPARATOR_LIBS
#define LIST_SEPARATOR
Separator for list values in registry.
string GetOpt(const CPtbRegistry ®istry, const string §ion, const string &opt, const string &config)
const TYPE & Get(const CNamedParameterList *param)
constexpr bool empty(list< Ts... >) noexcept
std::istream & in(std::istream &in_, double &x_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
double f(double x_, const double &y_)
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)
string FilterDefine(const string &define)
static const char * str(char *buf, int n)
string GetConfigFullName(void) const
list< string > m_IncludeDir
list< string > m_LibDefines
static bool IsConfigurableDefine(const string &define)
static string StripConfigurableDefine(const string &define)
string m_Root
Root of the project tree.
string m_Include
branch of tree
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
static const char *const features[]
static wxAcceleratorEntry entries[3]