Changeset 10230
- Timestamp:
- 03/09/11 08:35:04 (14 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/configure
r10216 r10230 18120 18120 18121 18121 if test "x$want_boost" = "xyes"; then 18122 boost_lib_version_req=1.4 218122 boost_lib_version_req=1.40 18123 18123 boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` 18124 18124 boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` -
trunk/FACT++/configure.ac
r10216 r10230 120 120 ###################################################################### 121 121 122 AX_BOOST_BASE([1.4 2], [],122 AX_BOOST_BASE([1.40], [], 123 123 [ 124 124 echo "Error! The boost C++ libraries are not properly installed." -
trunk/FACT++/src/Configuration.cc
r10220 r10230 264 264 #include "Configuration.h" 265 265 266 #include <fstream> 266 267 #include <iostream> 267 268 268 269 #include <boost/regex.hpp> 269 #include <boost/filesystem.hpp>270 //#include <boost/filesystem.hpp> 270 271 #include <boost/program_options.hpp> 271 272 … … 759 760 //! - describe what happens in a more general way 760 761 //! - print a waring when no default coonfig file is read 762 //! - proper handling and error messages if files not available 761 763 // 762 764 const po::variables_map &Configuration::Parse(int argc, char **argv) … … 829 831 const bool checkf = !getfiles.count("dont-check-files") && !getfiles.count("dont-check"); 830 832 const bool defaulted = getfiles.count("default") && getfiles["default"].defaulted(); 831 const bool exists = boost::filesystem::exists(fDefaultFile); 832 833 //const bool exists = boost::filesystem::exists(fDefaultFile); 834 835 ifstream indef(fDefaultFile.c_str()); 836 // ===> FIXME: Proper handling of missing file or wrong file name 833 837 const po::parsed_options parsed_defaultfile = 834 ! exists&& defaulted ?838 !indef && defaulted ? 835 839 po::parsed_options(&opt_configfile) : 836 po::parse_config_file<char>( fDefaultFile.c_str(), opt_configfile, !checkf);840 po::parse_config_file<char>(indef, opt_configfile, !checkf); 837 841 838 842 // ------------------------ (6) -------------------------- … … 840 844 if (getfiles.count("print-default") || getfiles.count("print-all")) 841 845 { 842 if (! exists&& defaulted)846 if (!indef && defaulted) 843 847 cout << "No configuration file by --default option specified." << endl; 844 848 else … … 861 865 } 862 866 863 // cout << "PRIO : " << fPriorityFile << endl;864 867 ifstream inpri(fPriorityFile.c_str()); 868 // ===> FIXME: Proper handling of missing file or wrong file name 865 869 const po::parsed_options parsed_priorityfile = 866 870 fPriorityFile.empty() ? po::parsed_options(&opt_configfile) : 867 po::parse_config_file<char>( fPriorityFile.c_str(), opt_configfile, !checkf);871 po::parse_config_file<char>(inpri, opt_configfile, !checkf); 868 872 869 873 // ------------------------ (8) -------------------------- … … 888 892 po::store(parsed_defaultfile, getdatabase); 889 893 890 // cout << "NODB : " << getdatabase.count("no-database") << endl;891 892 894 if (getdatabase.count("database") && !getdatabase.count("no-database")) 893 895 { … … 896 898 } 897 899 898 // cout << "DB : " << fDatabase << endl;899 900 const bool checkdb = !getdatabase.count("dont-check-database") && !getdatabase.count("dont-check"); 900 901 -
trunk/FACT++/src/argv.cc
r10222 r10230 149 149 catch (std::exception &e) 150 150 { 151 #if BOOST_VERSION > 104000 151 152 po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e); 152 153 if (MO) 153 154 cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl; 154 155 else 156 #endif 155 157 cout << "Error: " << e.what() << endl; 156 158 cout << endl; -
trunk/FACT++/src/dclient5.cc
r10221 r10230 491 491 catch (std::exception &e) 492 492 { 493 #if BOOST_VERSION > 104000 493 494 po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e); 494 495 if (MO) 495 496 cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl; 496 497 else 498 #endif 497 499 cout << "Error: " << e.what() << endl; 498 500 cout << endl; -
trunk/FACT++/src/test3.cc
r10221 r10230 62 62 catch (std::exception &e) 63 63 { 64 #if BOOST_VERSION > 104000 64 65 po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e); 65 66 if (MO) 66 67 cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl; 67 68 else 69 #endif 68 70 cout << "Error: " << e.what() << endl; 69 71 cout << endl;
Note:
See TracChangeset
for help on using the changeset viewer.