Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include <fvar.hpp>
00008 #include <adstring.hpp>
00009 #if defined(__BORLANDC__)
00010 #include <strstrea.h>
00011 #include <iomanip.h>
00012 #else
00013 #include <sstream>
00014 using namespace std;
00015 #endif
00016
00017 #include <sstream>
00018 using std::ostringstream;
00019
00020 #define STR(x) #x
00021 #define STR2(x) STR(x)
00022
00030 void banner(const adstring& program_name)
00031 {
00032 ostringstream ss;
00033
00034 ss << "ADMB Program: " << program_name << "\n\n";
00035
00036 ss << "ADMB";
00037
00038 #if defined(ADMB_VERSION)
00039 ss << "-" << STR2(ADMB_VERSION);
00040 #endif
00041
00042 if (which_library() == 'o')
00043 ss << " optimized libraries";
00044 else
00045 ss << " safe libraries";
00046
00047 ss << " compiled with ";
00048
00049 #if defined(__GNUC__)
00050 ss << "GNU C++ " << __GNUC__ << '.' << __GNUC_MINOR__ << '.'
00051 << __GNUC_PATCHLEVEL__;
00052 #if defined(__x86_64)
00053 ss << " (64bit)";
00054 #else
00055 ss << " (32bit)";
00056 #endif
00057 #elif defined(_MSC_VER)
00058 ss << "Microsoft Visual C++ ";
00059 #if (_MSC_VER==1300)
00060 ss << "7.0";
00061 #elif (_MSC_VER==1310)
00062 ss << "2003 7.1";
00063 #elif (_MSC_VER==1400)
00064 ss << "2005 8.0";
00065 #elif (_MSC_VER==1500)
00066 ss << "2008 9.0";
00067 #elif (_MSC_VER==1600)
00068 ss << "2010 10.0";
00069 #elif (_MSC_VER==1700)
00070 ss << "2012 11.0";
00071 #elif (_MSC_VER==1800)
00072 ss << "2013 12.0";
00073 #else
00074 ss << "2015 14.0";
00075 #endif
00076 #if defined(_M_X64)
00077 ss << "(64bit)";
00078 #else
00079 ss << "(32bit)";
00080 #endif
00081 #elif defined(__BORLANDC__)
00082 ss << "Borland C++";
00083 #if (__BORLANDC__==0x550)
00084 ss << " 5.5";
00085 #elif (__BORLANDC__==0x551)
00086 ss << " 5.51";
00087 #endif
00088 ss << "(32bit)";
00089 #elif defined(__SUNPRO_CC)
00090 ss << "Solaris Studio";
00091 #if (__SUNPRO_CC==0x420)
00092 ss << "4.2";
00093 #elif (__SUNPRO_CC==0x500)
00094 ss << "5.0";
00095 #endif
00096 #if defined(__x86_64)
00097 ss << "(64bit)";
00098 #else
00099 ss << "(32bit)";
00100 #endif
00101 #elif defined(__INTEL_COMPILER)
00102 ss << "Intel C/C++";
00103 #if (__INTEL_COMPILER==500)
00104 ss << " 5.0"
00105 #elif (__INTEL_COMPILER==600)
00106 ss << " 6.0"
00107 #elif (__INTEL_COMPILER==800)
00108 ss << " 8.0"
00109 #elif (__INTEL_COMPILER==900)
00110 ss << " 9.0"
00111 #endif
00112 #if defined(__x86_64)
00113 ss << "(64bit)";
00114 #else
00115 ss << "(32bit)";
00116 #endif
00117 #else
00118 ss << "unknown compiler";
00119 #endif
00120 ss << "\n";
00121 ss << "Copyright (c) 2008-2015 ADMB Foundation"
00122 << " and Regents of the University of California\n";
00123 ss << "Build date: " << __DATE__ << "\n";
00124 #if defined(ADMB_REVISION)
00125 ss << "Revision: " << STR2(ADMB_REVISION) << "\n";
00126 #endif
00127
00128 cout << ss.str() << endl;
00129 }