astrotypes
0.0
|
astrotypes is a header only library and so installation is a case of using #include
directives and setting the -I option on your compiler to point to the astrotypes headers install location. Note that the dependencies will also need to be installed.
If you are using git to mamange your repository one of the many strategies available is called subtrees. Although we provide a subtree example we do not necessarily condone its use. Each stategy has its own merits and compromises and the user should satisfy themselves as to the most appropriate one for their project.
From the top level of your project, create a directory for putting in thirdparty dependencies.
Now use git subtrees to install astrotypes
Any time you need to update the version of astrotypes you can use:
The only thing left to do is to update your build system so that your thirdparty directory, and the required dependencies are added to the include path.
Cmake is a widely used, platform and toolchain agnostic build tool. One of the features of cmake is that it provides out of source builds so you don't mix up build products (libraries, binaries, etc) from the source code. This is very powerful in other ways, you may want to build the same source using different compilers and compare the results.
Configuring your build with cmake:
point cmake to the top of the astrotypes repository (along with any flags) and it will generate the appropriate build files for your host system (gnu make files on linux, nmake or .proj files for windows, etc)
e.g to build a debug debug
e.g to build a fully optimised version
Note that cmake will do its best to determine where dependencies are on your system. You can override this behaviour with special flags. See the dependencies section for more details and options.
If you want to see whats going on under the hood you can run
Boost Website: https://www.boost.org
This project requires the boost_units library. You can use your local, or system installation of boost libs for this, however for convenience we also provide a packaged version of boost_units (and its dependencies) in the thirdparty directory of this repository.
By default the cmake for building the tests and examples will look for boost in the following order:
If you wish to force the use of the thridparty packaged version add the flag -DUSE_THIRDPARTY_BOOST=true to ignore any boost versions installed on the system. Note that boost units is a header-only library and does not need to be built.
Cmake Variable | Description |
---|---|
USE_THIRDPARTY_BOOST | Force the use of the packaged boost version, ignoring any installed boost versions (default: false) |
Boost_LIBRARY_DIRS | Explicitly specify a directory where the boost libraries reside |
Boost_INCLUDE_DIRS | Explicitly specify a directory where the boost header files reside |
Boost_ROOT | Explicitly specify a directory where the boost distiburion resides |