![]() | regina-helper |
| Prev | Command Line: Compiling and Linking | Next |
Name
regina-helper — Helper utility for working with a Regina installation
Synopsis
regina-helper {action} [args...]
regina-helper {action} [--help]
Description
This utility understands the layout of your Regina installation, and it can help you with a variety of tasks that require this knowledge. For example, it can create Makefiles and/or sample C++ code for you, or help you run Regina's test suite.
The first argument to regina-helper should be an
action, indicating what you want the utility to do. The available actions
are described in detail below.
To learn more about what an action does, you can run
regina-helper .
action --help
This utility is available in most but not all settings:
If you are using GNU/Linux and you have Regina installed in a system location (e.g., beneath
/usr/or/usr/local/), then regina-helper should be included with your installation, and any output it produces should be relative to this system installation.If you are using macOS and you are running Regina from an app bundle (which might be under
/Applications/or might be somewhere else), then you can run regina-helper from within the app bundle (.../Regina.app/Contents/MacOS/regina-helper), and any output it produces should be relative to this app bundle.If you are building Regina yourself from the source tree (on any platform), then you can run regina-helper from the source tree, and any output it produces should be relative to this same source tree. In particular, it will not assume that you have actually installed Regina.
If you are using pre-built packages for Regina on Windows, then regina-helper will not be included in your installation.
Actions
The first argument to regina-helper should be one of the following actions:
installtypeWrites a single token to standard output identifying the type of Regina installation.
example$regina-helper installtypeXDGexample$The output will be one of the following:
- XDG
Indicates that you are running Regina from an installation in a fixed location that follows the freedesktop.org layout. This is seen with Regina's GNU/Linux packages, as well as local CMake builds with no special arguments.
- HPC
Indicates that you are running Regina from a slimmed-down installation (e.g., no GUI or HTML docs), which is installed in a fixed but possibly non-standard location, suitable for builds on high-performance computing systems. This is typically seen with local CMake builds where
REGINA_INSTALL_TYPEwas explicitly set toHPC.- Bundle
Indicates that you are running Regina from within a macOS app bundle.
- Windows
Indicates that you are running Regina from within Regina's Windows app. It is unlikely that you will see this of course, since regina-helper is not shipped with Windows installations.
- Source
Indicates that you are running Regina directly from the source tree (i.e., a local build that has not necessarily been installed).
The
installtypeaction takes no additional arguments.makefileCreates a Makefile in the current directory, suitable for compiling C++ programs against Regina. In particular, once you have your Makefile in place, you can (for example) compile a C++ program
foo.ccjust by runningmake foo.The main reason for using this Makefile is that it includes compiler and linker flags for accessing Regina's C++ calculation engine. (In particular, using this Makefile is a simpler alternative to extracting compiler and linker flags from regina-engine-config.)
The
makefileaction accepts the optional arguments--forceand/or--rpath; these are described below.cc,cppCreates a Makefile in the current directory that is suitable for compiling C++ programs against Regina, as well as a sample C++ program that can be used as a starting point for your own code.
example$regina-helper ccWriting sample.cc... Preparing Makefile...example$ lsMakefile sample.ccexample$See the
makefileaction above for further discussion of how you can use this Makefile.The C++ source file will be called either
sample.ccorsample.cpp, depending on whether you gaveccorcppas the action argument to regina-helper.The
cc/cppaction accepts the optional arguments--forceand/or--rpath; these are described below.testRuns Regina's detailed C++ calculation engine test suite.
Regina has a large and thorough test suite, designed to guard against system incompatibilities and/or unforseen bugs. This test suite includes several components that target the C++ calculation engine, the Python bindings, and the command-line utilities. The bulk of the tests are for the C++ calculation engine, and those are the tests that will be run here.
example$regina-helper testRunning C++ test suite from the installation beneath /usr/local/. [==========] Running 522 tests from 53 test suites. [----------] Global test environment set-up. [----------] 2 tests from AbelianGroupTest [ RUN ] AbelianGroupTest.incrementalBuild [ OK ] AbelianGroupTest.incrementalBuild (0 ms) [ RUN ] AbelianGroupTest.tightEncoding [ OK ] AbelianGroupTest.tightEncoding (0 ms) [----------] 2 tests from AbelianGroupTest (1 ms total) [----------] 6 tests from CoversTest [ RUN ] CoversTest.trivial [ OK ] CoversTest.trivial (2 ms) ...The C++ test suite uses the Google Test framework, which supports many different arguments to customise your test suite run. Any additional arguments that you supply with the
testaction will be passed directly through to Google Test. You can runregina-helper test --helpto see what all of these possible arguments are.helpOutputs usage information for the regina-helper utility.
This action takes no additional arguments.
Options
--forceOverwrites any existing files (such as
Makefile, orsample.cc). By default, regina-helper will not overwrite a file that already exists.This option is used with the
makefileandcc/cppactions.--rpathAlways uses an rpath option in the linker flags within the Makefile that is created. This is useful for when your Regina installation is not on the standard library path.
If your program compiles and links correctly but crashes when you run it because it cannot find the library
libregina-engine.so, then the--rpathoption might solve your problem. (You will of course need to rebuild your program after updating the Makefile.)By default, an rpath option will only be used if you are running Regina directly out of the source tree.
This option is used with the
makefileandcc/cppactions.--helpOutputs detailed usage information for a particular regina-helper action.
example$regina-helper test --helpUsage: /usr/local/bin/regina-helper test [testsuite_args...] Runs Regina's C++ test suite. ...
Author
This utility was written by Benjamin Burton
<bab@maths.uq.edu.au>.
Many people have been involved in the development
of Regina; see the acknowledgements
page for a full list of credits.
| Prev | Contents | Next |
| regina-engine-config | Up | Version History |
