Program Listing for File cmdline.h

Program Listing for File cmdline.h#

Return to documentation for file (src/frontend/SageIII/sage_support/cmdline.h)

#ifndef ROSE_SAGESUPPORT_CMDLINE_H
#define ROSE_SAGESUPPORT_CMDLINE_H

/*-----------------------------------------------------------------------------
 *  Dependencies
 *---------------------------------------------------------------------------*/
// tps (01/14/2010) : Switching from rose.h to sage3.
#include "sage_support.h"
//This text comes directly from the LicenseInformation/ROSE_BSD_License.txt file in the source code. */
extern const char *licenseText;

namespace Rose {
namespace Cmdline {
  enum {
    KEEP_OPTION_IN_ARGV = 0,
    REMOVE_OPTION_FROM_ARGV = 1
  };

  extern ROSE_DLL_API int verbose;

  void
  makeSysIncludeList(const Rose_STL_Container<string> &dirs, Rose_STL_Container<string> &result, bool using_nostdinc_option = false);

  //
  // TOO1 (11/21/2013): Current CLI handling assumes that there is no space
  // between the -I option and its <path> option. That is,
  //
  //      +----------+------------+
  //      | Valid    |  -I<path>  |
  //      +----------+------------+
  //      | Invalid  |  -I <path> |
  //      +----------+------------+
  //
  // Note: Path argument is validated for existence.
  //
  std::vector<std::string>
  NormalizeIncludePathOptions (std::vector<std::string>& argv);

  void
  StripRoseOptions (std::vector<std::string>& argv);

  void
  ProcessKeepGoing (SgProject* project, std::vector<std::string>& argv);

  namespace Unparser {
    static const std::string option_prefix = "-rose:unparser:";

    bool
    OptionRequiresArgument (const std::string& option);

    void
    StripRoseOptions (std::vector<std::string>& argv);

    void
    Process (SgProject* project, std::vector<std::string>& argv);

    void
    ProcessClobberInputFile (SgProject* project, std::vector<std::string>& argv);
  } // namespace ::Rose::Cmdline::Unparser

  namespace Fortran {
    static const std::string option_prefix = "-rose:fortran:";

    bool
    OptionRequiresArgument (const std::string& option);

    void
    StripRoseOptions (std::vector<std::string>& argv);

    void
    Process (SgProject* project, std::vector<std::string>& argv);

    // -rose:fortran
    void
    ProcessFortranOnly (SgProject* project, std::vector<std::string>& argv);

    namespace Ofp {
      extern ROSE_DLL_API std::list<std::string> jvm_options;

      ROSE_DLL_API void
      StripRoseOptions (std::vector<std::string>& argv);

      ROSE_DLL_API std::string
      GetRoseClasspath();

      ROSE_DLL_API void
      Process (SgProject* project, std::vector<std::string>& argv);

      ROSE_DLL_API void
      ProcessJvmOptions (SgProject* project, std::vector<std::string>& argv);

      ROSE_DLL_API void
      ProcessEnableRemoteDebugging (SgProject* project, std::vector<std::string>& argv);
    } // namespace Rose::Cmdline::Fortran::OpenFortranParser
  } // namespace Rose::Cmdline::Fortran

  namespace Gnu {
    bool
    OptionRequiresArgument (const std::string& option);

    void
    Process (SgProject* project, std::vector<std::string>& argv);

    // --param
    void
    ProcessParam (SgProject* project, std::vector<std::string>& argv);
  } // namespace Rose::Cmdline::Gnu
} // namespace Rose::Cmdline
} // namespace Rose
#endif // ROSE_SAGESUPPORT_CMDLINE_H