Skip to content
Snippets Groups Projects
Commit 330c717f authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added "has" tools

Added more ways to check if tools are installed. Now also
plumed --has-matheval
is allowed
parent 82d98711
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,23 @@ std::string getMakefile(){
return std::string(conf,conf+std::strlen(conf));
}
bool hasMatheval(){
#if __PLUMED_HAS_MATHEVAL
return true;
#else
return false;
#endif
}
bool hasDlopen(){
#if __PLUMED_HAS_DLOPEN
return true;
#else
return false;
#endif
}
}
}
......@@ -33,6 +33,10 @@ std::string getPlumedRoot();
std::string getMakefile();
bool hasMatheval();
bool hasDlopen();
}
}
......
......@@ -118,6 +118,8 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,Communicator& pc){
} else if(a=="--has-mpi"){
if(Communicator::initialized()) return 0;
else return 1;
} else if(a=="--has-matheval"){
return (config::hasMatheval()?0:1);
} else if(a=="--no-mpi"){
// this is ignored, as it is parsed in main
if(i>1){
......@@ -176,7 +178,8 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,Communicator& pc){
" plumed [command] -h : to print help for a specific command\n"
"Options:\n"
" [help|-h|--help] : to print this help\n"
" [--has-mpi] : fails if plumed is running with MPI\n"
" [--has-mpi] : fails if plumed is running without MPI\n"
" [--has-matheval] : fails if plumed is compiled without matheval\n"
" [--load LIB] : loads a shared object (typically a plugin library)\n"
" [--standalone-executable] : tells plumed not to look for commands implemented as scripts\n"
"Commands:\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment