Changeset 20080
- Timestamp:
- 04/16/21 10:08:50 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Configuration.cc
r20075 r20080 31 31 - (3) Database entries 32 32 - (4) Options from the default configuration-file (given by \b --default, defaults to \b program_name.rc) 33 - (5) Options from the global configuration-file ( constructor path +\b fact++.rc)33 - (5) Options from the global configuration-file (\b fact++.rc) 34 34 - (6) Environment variables 35 36 The global configuration-file fact++.rc is search in 1) the current working 37 directory, 2) the directory in which the executable is located, 3) the sysconfdir 38 (defined during compile time). 35 39 36 40 Which options are accepted is defined by the program. To get a list … … 886 890 //! - (5) Read and parse the global configuration file, which is compiled 887 891 //! from the path corresponding to the argument given in the 888 //! constructor + "/fact++.rc" (or sysconf-prefix + fact++.rc 889 //! if not found), unrecognized options are always 892 //! "/fact++.rc", unrecognized options are always 890 893 //! allowed. Note that in contradiction to all other options 891 894 //! the options in this file are not checked at all. Hence, … … 1050 1053 1051 1054 const boost::filesystem::path path(GetName()); 1052 string globalfile = (path.parent_path()/boost::filesystem::path("fact++.rc")).string(); 1055 string globalfile = (boost::filesystem::current_path()/boost::filesystem::path("fact++.rc")).string(); 1056 cerr << "Searching global options in '" << globalfile << "'" << endl; 1057 1058 if (!boost::filesystem::exists(globalfile) && boost::filesystem::current_path()!=path.parent_path()) 1059 { 1060 globalfile = (path.parent_path()/boost::filesystem::path("fact++.rc")).string(); 1061 cerr << "Searching global options in '" << globalfile << "'" << endl; 1062 } 1053 1063 1054 1064 #ifdef PACKAGE_INSTALL_SYSCONFDIR 1055 1065 if (!boost::filesystem::exists(globalfile)) 1066 { 1056 1067 globalfile = (boost::filesystem::path(PACKAGE_INSTALL_SYSCONFDIR)/boost::filesystem::path("fact++.rc")).string(); 1068 cerr << "Searching global options in '" << globalfile << "'" << endl; 1069 } 1057 1070 #endif 1058 1071
Note:
See TracChangeset
for help on using the changeset viewer.