Contains methods to do with command line arugments and running on the command line.
More...
#include "argparse/argparse.hpp"
#include "common.hpp"
Go to the source code of this file.
|
| std::vector< std::string > | ws2st::args::getHDF5CompileFlags () |
| | Get the compile flags needed to compile with HDF5 Does not include MPI flags - these need to be added separately. More...
|
| |
|
std::vector< std::string > | ws2st::args::getHDF5LinkingFlags () |
| |
| std::vector< std::string > | ws2st::args::getImplCompileFlag (Implementations impl) |
| | Return the implementation specific compile flag This controls some optional features in the public API headers. More...
|
| |
| std::string | ws2st::args::executeCommandLine (const std::string cmd) |
| | Executes on the command line the command and returns the output This is probably slightly hack-y but also probably the best way to get the flags used by e.g. the MPICXX compiler wrapper to be used in the compilation stage for analysis by our tool. More...
|
| |
| std::vector< std::string > | ws2st::args::getMPICompileFlags () |
| | Executes mpicxx --showme:compile to get the compile flags for the MPI implementation. More...
|
| |
|
std::vector< std::string > | ws2st::args::getMPILinkingFlags () |
| |
| std::optional< Implementations > | ws2st::args::getImplFromString (const std::string istr) |
| | Returns the API implementation enum represented by this string (if exists) More...
|
| |
| bool | ws2st::args::areMPIFlagsRequired (Implementations impl, const WashOptions &opts) |
| | Returns whether the MPI flags will be needed to compile this program. More...
|
| |
| WashOptions | ws2st::args::parseCommandLine (int argc, const char **argv) |
| | Parses the program command line into the options struct. More...
|
| |
Contains methods to do with command line arugments and running on the command line.
- Author
- james
- Version
- 0.1
- Date
- 2024-01-25
- Copyright
- Copyright (c) 2024
◆ areMPIFlagsRequired()
| bool ws2st::args::areMPIFlagsRequired |
( |
Implementations |
impl, |
|
|
const WashOptions & |
opts |
|
) |
| |
Returns whether the MPI flags will be needed to compile this program.
- Parameters
-
| impl | The implementation chosen |
| opt | Program options |
- Returns
- true if needed, false otherwise
◆ executeCommandLine()
| std::string ws2st::args::executeCommandLine |
( |
const std::string |
cmd | ) |
|
Executes on the command line the command and returns the output This is probably slightly hack-y but also probably the best way to get the flags used by e.g. the MPICXX compiler wrapper to be used in the compilation stage for analysis by our tool.
- Parameters
-
| cmd | The command to execute |
- Returns
- stdout of the command
◆ getHDF5CompileFlags()
| std::vector< std::string > ws2st::args::getHDF5CompileFlags |
( |
| ) |
|
Get the compile flags needed to compile with HDF5 Does not include MPI flags - these need to be added separately.
- Returns
- list of arguments to use
◆ getImplCompileFlag()
| std::vector< std::string > ws2st::args::getImplCompileFlag |
( |
Implementations |
impl | ) |
|
Return the implementation specific compile flag This controls some optional features in the public API headers.
- Parameters
-
| impl | The implementation being used |
- Returns
- list of compiler arguments to add
◆ getImplFromString()
| std::optional< Implementations > ws2st::args::getImplFromString |
( |
const std::string |
istr | ) |
|
Returns the API implementation enum represented by this string (if exists)
- Parameters
-
- Returns
- Implementation enum if exists, else nullopt.
◆ getMPICompileFlags()
| std::vector< std::string > ws2st::args::getMPICompileFlags |
( |
| ) |
|
Executes mpicxx --showme:compile to get the compile flags for the MPI implementation.
- Returns
- vector of string compile flags
◆ parseCommandLine()
| WashOptions ws2st::args::parseCommandLine |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
Parses the program command line into the options struct.
- Parameters
-
| argc | |
| argv | Standard meaning of these arguments |
- Returns
- WashOptions struct representing the options chosen