build floating point type report
This commit is contained in:
parent
77408f16af
commit
9e955fa11e
|
@ -36,10 +36,11 @@ pFlow::commandLine::commandLine(word appName, word disptn)
|
||||||
{
|
{
|
||||||
|
|
||||||
CLI::App::add_flag_callback(
|
CLI::App::add_flag_callback(
|
||||||
"--discription",
|
"--description",
|
||||||
[disptn, appName]() {
|
[disptn, appName]() {
|
||||||
output<<"\n"<<yellowText(versoinCopyright)<<endl<<endl;
|
output<<"\n"<<yellowText(versoinCopyright)<<endl;
|
||||||
output<<"Discription for "<< boldText(appName)<<":\n";
|
output<<yellowText(floatingPointDescription())<<endl<<endl;
|
||||||
|
output<<"Description for "<< boldText(appName)<<":\n";
|
||||||
output<<" "<<disptn<<endl;
|
output<<" "<<disptn<<endl;
|
||||||
},
|
},
|
||||||
"What does this app do?"
|
"What does this app do?"
|
||||||
|
@ -52,7 +53,7 @@ bool pFlow::commandLine::parse(
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
CLI::App::parse(argc, argv);
|
CLI::App::parse(argc, argv);
|
||||||
if(CLI::App::count("--discription")) return false;
|
if(CLI::App::count("--description")) return false;
|
||||||
return true;
|
return true;
|
||||||
} catch(const ParseError &e) {
|
} catch(const ParseError &e) {
|
||||||
CLI::App::exit(e);
|
CLI::App::exit(e);
|
||||||
|
|
|
@ -30,10 +30,13 @@ namespace pFlow
|
||||||
|
|
||||||
#ifdef pFlow_Build_Double
|
#ifdef pFlow_Build_Double
|
||||||
#define useDouble 1
|
#define useDouble 1
|
||||||
|
inline const char* floatingPointType__ = "double";
|
||||||
#else
|
#else
|
||||||
#define useDouble 0
|
#define useDouble 0
|
||||||
|
inline const char* floatingPointType__ = "float";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// scalars
|
// scalars
|
||||||
#if useDouble
|
#if useDouble
|
||||||
using real = double;
|
using real = double;
|
||||||
|
@ -57,6 +60,12 @@ using label = std::size_t;
|
||||||
|
|
||||||
using word = std::string;
|
using word = std::string;
|
||||||
|
|
||||||
|
inline
|
||||||
|
auto floatingPointDescription()
|
||||||
|
{
|
||||||
|
return word("In this build, ") + word(floatingPointType__) +
|
||||||
|
word(" is used for floating point operations.");
|
||||||
|
}
|
||||||
|
|
||||||
} // end of pFlow
|
} // end of pFlow
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ if(!cmds.parse(argc, argv)) return 0;
|
||||||
|
|
||||||
output<<endl;
|
output<<endl;
|
||||||
Report(1)<< "You are using "<<yellowText(cmds.productNameCopyright())<<endReport;
|
Report(1)<< "You are using "<<yellowText(cmds.productNameCopyright())<<endReport;
|
||||||
|
Report(1)<< yellowText(pFlow::floatingPointDescription())<<endReport;
|
||||||
|
|
||||||
|
|
||||||
// this should be palced in each main
|
// this should be palced in each main
|
||||||
|
|
Loading…
Reference in New Issue