A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/msvc__configure_8cpp_source.html below:

NCBI C++ ToolKit: src/build-system/project_tree_builder/msvc_configure.cpp Source File

36 #ifdef NCBI_XCODE_BUILD 37  #include <sys/utsname.h> 49

: m_HaveBuildVer(

false

), m_HaveRevision(

false

)

62  string

key_file_name(lib);

64

key_file_name +=

".installed"

;

66  if

(

CDirEntry

(key_file_path).Exists() ) {

74  const

list<string> libs_to_install,

82  GetApp

().GetRegSettings().m_CompilersSubdir);

87  "Makefile.third_party.mk"

);

92  CDir

makefile_dir(dir);

93  if

( !makefile_dir.

Exists

() ) {

103  ITERATE

(list<string>,

n

, libs_to_install) {

104  const string

& lib = *

n

;

110  if

(bin_path.empty()) {

111

bin_path =

site

.GetThirdPartyLibsBinSubDir();

120  key

+=

site

.GetThirdPartyLibsBinPathSuffix();

122

ofs <<

key

<<

" = "

<< bin_dir <<

"\n"

;

125  site

.SetThirdPartyLibBin(lib, bin_dir);

128

lib <<

"|"

<<

config

.GetConfigFullName()

129

<<

" disabled, path not found"

);

133

lib <<

"|"

<<

config

.GetConfigFullName()

134

<<

": no LIBPATH specified"

);

141  const

list<SConfigInfo>& configs,

142  const string

& root_dir)

144  _TRACE

(

"*** Analyzing 3rd party libraries availability ***"

);

146  site

.InitializeLibChoices();

148  site

.ProcessMacros(configs);

153  _TRACE

(

"*** Creating Makefile.third_party.mk files ***"

);

155

list<string> third_party_to_install;

156  site

.GetThirdPartyLibsToInstall(&third_party_to_install);

158  ITERATE

(list<SConfigInfo>, p, configs) {

161

third_party_to_install,

163  GetApp

().GetBuildType());

169  const

list<SConfigInfo>& configs,

170  const string

& root_dir)

174  ITERATE

(list<SConfigInfo>, p, configs) {

184  _TRACE

(

"*** Creating local ncbiconf headers ***"

);

186  ITERATE

(list<SConfigInfo>, p, configs) {

201

eConfigureDefinesPath,

202  "Configure defines file name is not specified"

);

208  "No configurable macro definitions specified."

);

210  _TRACE

(

"Configurable macro definitions: "

);

222  if

( !

site

.IsDescribed(define) ) {

224

define <<

": Macro not defined"

);

227

list<string> components;

228  site

.GetComponents(define, &components);

229  ITERATE

(list<string>, p, components) {

230  const string

& component = *p;

231  if

(

site

.IsBanned(component)) {

233

component <<

"|"

<<

config

.GetConfigFullName()

234

<<

": "

<< define <<

" not provided, disabled"

);

237  if

(

site

.IsProvided( component,

false

)) {

241  site

.GetLibInfo(component,

config

, &lib_info);

242  if

( !

site

.IsLibOk(lib_info) ||

243

!

site

.IsLibEnabledInConfig(component,

config

)) {

246

component <<

"|"

<<

config

.GetConfigFullName()

247

<<

": "

<< define <<

" not satisfied, disabled"

);

259  string

cfg_root_inc(root_dir);

263  string

extra =

site

.GetConfigureEntry(

"ExtraDefines"

);

267  if

(extra.empty() || random_count <= 0 ||

CFile

(filename).Exists()) {

282  string

prefix(

"#define NCBI_RANDOM_VALUE_"

);

283

ofs << prefix <<

"TYPE Uint4"

<< endl;

284

ofs << prefix <<

"MIN 0"

<< endl;

286

<< std::showbase <<

rnd

.GetMax() << endl << endl;

287  for

(

int i

= 0;

i

< random_count; ++

i

) {

288

ofs << prefix << std::noshowbase <<

i 289

<< setw(16) << std::showbase <<

rnd

.GetRand() << endl;

302  string

cfg_root_inc(root_dir);

320  if

(filename_cache) {

342  string

prop_file_info;

343  if

(!prop_file_name.empty()) {

348  if

(!prop_file_info.empty()) {

349  CRegexp

re(

"teamcity.build.id=(\\d+)"

);

350

tc_build_id = re.

GetMatch

(prop_file_info, 0, 1);

355  if

(tree_root.empty()) {

358  if

(!tree_root.empty()) {

362  string cmd

=

"git -C "

+ tree_root +

" log -1 --format=%h > "

+ tmp_file;

370  cmd

=

"svn info "

+ tree_root +

" > "

+ tmp_file;

379  if

(!

info

.empty()) {

380  CRegexp

re(

"Revision: (\\d+)"

);

390  if

(!

info

.empty()) {

391  CRegexp

re(

"/production/components/[^/]*/(\\d+)"

);

398  if

(sc_ver.empty()) {

402  if

(svn_rev.empty() && !prop_file_info.empty()) {

403  CRegexp

re(

"build.vcs.number=(\\d+)"

);

404

svn_rev = re.

GetMatch

(prop_file_info, 0, 1);

408  if

(tc_build.empty()) {tc_build =

"0"

;}

409  if

(sc_ver.empty()) {sc_ver =

"0"

;}

410  if

(svn_rev.empty()) {svn_rev =

"0"

;}

413

build_vars[

"NCBI_TEAMCITY_BUILD_NUMBER"

] = tc_build;

414

build_vars[

"NCBI_TEAMCITY_BUILD_ID"

] = tc_build_id;

415

build_vars[

"NCBI_TEAMCITY_PROJECT_NAME"

] = tc_prj;

416

build_vars[

"NCBI_TEAMCITY_BUILDCONF_NAME"

] = tc_conf;

417

build_vars[

"NCBI_REVISION"

]

418

= (git_rev.empty() && svn_rev !=

"0"

) ? svn_rev : git_rev;

419

build_vars[

"NCBI_SUBVERSION_REVISION"

] = svn_rev;

420

build_vars[

"NCBI_SC_VERSION"

] = sc_ver;

424  auto

converter = [](

const string

& file_in,

const string

& file_out,

const map<string,string>

& vocabulary) {

425  string

candidate = file_out +

".candidate"

;

427  if

( ofs.is_open() ) {

432  while

( getline(ifs, line) ) {

433  for

(string::size_type from = line.find(

"@"

); from != string::npos; from = line.find(

"@"

)) {

434

string::size_type to = line.find(

"@"

, from + 1);

435  if

(to != string::npos) {

436  string key

= line.substr(from+1, to-from-1);

437  if

(vocabulary.find(

key

) != vocabulary.end()) {

438

line.replace(from, to-from+1, vocabulary.at(

key

));

440

line.replace(from, to-from+1,

""

);

454

converter(file_in, filename, build_vars);

461

converter(file_in, filename, build_vars);

481  const string

& define = *p;

483  _TRACE

(

"Macro definition Ok "

<< define);

487  "Macro definition not satisfied: "

<< define);

503

signature =

"XCODE"

;

509

signature +=

"-"

+

config

.GetConfigFullName();

514 #ifdef NCBI_XCODE_BUILD 517

signature +=

"_"

+

tmp

;

520  if

(uname(&u) == 0) {

534  if

(0 == gethostname(hostname, 255))

541

signature +=

"i386-pc-"

;

552  string

candidate_path = filename +

".candidate"

;

558  "Configuration file modified"

);

561  "Configuration file unchanged"

);

567

ofs <<

"/* $"

<<

"Id"

<<

"$"

<< endl;

568

ofs <<

"* ==========================================================================="

<< endl;

570

ofs <<

"* PUBLIC DOMAIN NOTICE"

<< endl;

571

ofs <<

"* National Center for Biotechnology Information"

<< endl;

573

ofs <<

"* This software/database is a \"United States Government Work\" under the"

<< endl;

574

ofs <<

"* terms of the United States Copyright Act. It was written as part of"

<< endl;

575

ofs <<

"* the author's official duties as a United States Government employee and"

<< endl;

576

ofs <<

"* thus cannot be copyrighted. This software/database is freely available"

<< endl;

577

ofs <<

"* to the public for use. The National Library of Medicine and the U.S."

<< endl;

578

ofs <<

"* Government have not placed any restriction on its use or reproduction."

<< endl;

580

ofs <<

"* Although all reasonable efforts have been taken to ensure the accuracy"

<< endl;

581

ofs <<

"* and reliability of the software and data, the NLM and the U.S."

<< endl;

582

ofs <<

"* Government do not and cannot warrant the performance or results that"

<< endl;

583

ofs <<

"* may be obtained by using this software or data. The NLM and the U.S."

<< endl;

584

ofs <<

"* Government disclaim all warranties, express or implied, including"

<< endl;

585

ofs <<

"* warranties of performance, merchantability or fitness for any particular"

<< endl;

586

ofs <<

"* purpose."

<< endl;

588

ofs <<

"* Please cite the author in any work or product based on this material."

<< endl;

590

ofs <<

"* ==========================================================================="

<< endl;

592

ofs <<

"* Author: ......."

<< endl;

594

ofs <<

"* File Description:"

<< endl;

595

ofs <<

"* ......."

<< endl;

597

ofs <<

"* ATTENTION:"

<< endl;

598

ofs <<

"* Do not edit or commit this file into SVN as this file will"

<< endl;

599

ofs <<

"* be overwritten (by PROJECT_TREE_BUILDER) without warning!"

<< endl;

607  const string

& full_path,

const string

& signature)

const 617  if

(p->second ==

'1'

) {

618

ofs <<

"#define "

<< p->first <<

" "

<< p->second << endl;

620

ofs <<

"/* #undef "

<< p->first <<

" */"

<< endl;

624

ofs <<

"#define NCBI_SIGNATURE \\"

<< endl <<

" \""

<< signature <<

"\""

<< endl;

626

list<string> customH;

628  ITERATE

(list<string>, c, customH) {

632

<< endl <<

"* ===========================================================================" 633

<< endl <<

"* Included contents of "

<<

file 643

is.read(

buf

,

sizeof

(

buf

));

644

ofs.write(

buf

, is.gcount());

Utility class for distinguish between static and dll builds.

string GetTypeStr(void) const

static EMsvcPlatform GetMsvcPlatform(void)

static const string & GetMsvcVersionName(void)

static const string & GetMsvcPlatformName(void)

static string GetConfigNameKeyword(void)

static const string & GetRequestedArchs(void)

CNcbiOfstream & WriteNcbiconfHeader(CNcbiOfstream &ofs) const

list< string > m_ConfigureDefines

void Configure(CMsvcSite &site, const list< SConfigInfo > &configs, const string &root_dir)

void WriteNcbiconfMsvcSite(const string &full_path, const string &signature) const

void WriteBuildVer(CMsvcSite &site, const string &root_dir, const SConfigInfo &config)

bool ProcessDefine(const string &define, const CMsvcSite &site, const SConfigInfo &config) const

void WriteExtraDefines(CMsvcSite &site, const string &root_dir, const SConfigInfo &config)

void CreateConfH(CMsvcSite &site, const list< SConfigInfo > &configs, const string &root_dir)

void AnalyzeDefines(CMsvcSite &site, const string &root_dir, const SConfigInfo &config, const CBuildType &build_type)

string m_ConfigureDefinesPath

void InitializeFrom(const CMsvcSite &site)

string GetPlatformInfo(const string &sysname, const string &type, const string &orig) const

CProjBulderAppException –.

void GetCustomConfH(list< string > *files) const

void RegisterGeneratedFile(const string &file)

const SProjectTreeInfo & GetProjectTreeInfo(void)

const CMsvcSite & GetSite(void)

std::ofstream out("events_result.xml")

main entry point for tests

const CNcbiEnvironment & GetEnvironment(void) const

Get the application's cached environment.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

const string & Get(const string &name, bool *found=NULL) const

Get environment value by name.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

static TExitCode System(const char *cmdline)

Execute the specified command.

int TExitCode

Exit code type.

static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)

Normalize a path.

virtual bool Copy(const string &new_path, TCopyFlags flags=fCF_Default, size_t buf_size=0) const

Copy a file.

bool CreatePath(TCreateFlags flags=fCreate_Default) const

Create the directory path recursively possibly more than one at a time.

bool IsNewer(time_t tm, EIfAbsent if_absent) const

Check if the current entry is newer than a specified date/time.

virtual bool Remove(TRemoveFlags flags=eRecursive) const

Remove a directory entry.

virtual bool Exists(void) const

Check if directory "dirname" exists.

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 ConvertToOSPath(const string &path)

Convert "path" on any OS to the current OS-dependent path.

static string GetTmpName(ETmpFileCreationMode mode=eTmpFileGetName)

Get temporary file name.

static string ConcatPath(const string &first, const string &second)

Concatenate two parts of the path for the current OS.

const string & GetPath(void) const

Get entry path.

virtual bool Exists(void) const

Check existence of file.

static void SplitPath(const string &path, string *dir=0, string *base=0, string *ext=0)

Split a path string into its basic components.

@ fCF_Overwrite

The following flags define what to do when the destination entry already exists:

@ eGetRand_Sys

Use system-dependent random generator.

CTempString GetMatch(CTempString str, size_t offset=0, size_t idx=0, TMatch flags=fMatch_default, bool noreturn=false)

Get matching pattern and subpatterns.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ofstream CNcbiOfstream

Portable alias for ofstream.

IO_PREFIX::ifstream CNcbiIfstream

Portable alias for ifstream.

size_t NcbiStreamToString(string *s, CNcbiIstream &is, size_t pos=0)

Input the entire contents of an istream into a string (NULL causes drain).

static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to int.

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 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.

static string & ToUpper(string &str)

Convert string to upper case – string& version.

static string & ToLower(string &str)

Convert string to lower case – string& version.

@ fConvErr_NoThrow

Do not throw an exception on error.

static void hex(unsigned char c)

void s_ResetLibInstallKey(const string &dir, const string &lib)

static void s_CreateThirdPartyLibsInstallMakefile(CMsvcSite &site, const list< string > libs_to_install, const SConfigInfo &config, const CBuildType &build_type)

bool PromoteIfDifferent(const string &present_path, const string &candidate_path, const string &ignore)

const struct ncbi::grid::netcache::search::fields::KEY key

static size_t rnd(size_t minimal, size_t maximal)

Defines a portable execute class.

std::istream & in(std::istream &in_, double &x_)

CProjBulderApp & GetApp(void)

access to App singleton

#define PTB_INFO_EX(file, err_code, msg)

#define PTB_ERROR_EX(file, err_code, msg)

@ ePTB_ConfigurationError

#define PTB_WARNING_EX(file, err_code, msg)

#define PTB_ERROR(file, msg)

@ rtMultiThreadedDebugDLL

string m_Root

Root of the project tree.

string m_Compilers

<compilers> branch of tree

C++ wrappers for the Perl-compatible regular expression (PCRE) library.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4