Skip to content

2. Installation

Román Cárdenas edited this page Jul 2, 2022 · 11 revisions

Cadmium 2 is a header-only library. This means that you don't need to compile nor install it in your machine. You just have to include the header files to your project. To "install" Cadmium, you just have to download this repository and all its submodules on your local machine using git. Open a terminal (a Cygwin terminal in Windows) and insert the following commands:

cd <WORKSPACE>  # Set the terminal working directory to taste
git clone https://github.com/SimulationEverywhere/cadmium_v2.git  # Download Cadmium 2
cd cadmium_v2  # move to the parent folder of Cadmium 2
git submodule update --init --recursive  # Download the git submodules of Cadmium 2
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/<RELATIVE_PATH_TO_WORKSPACE>/cadmium_v2/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/<RELATIVE_PATH_TO_WORKSPACE>/cadmium_v2/json/include)

Testing the Software

We use GitHub Actions, a tool for Continuous Integration (CI), to ensure that the devel and main branches pass all the tests. You can check there whether the code is stable or not. However, you may want to run some tests to make sure that everything works as expected. You have two options:

  1. Use make to run the tests:
cd build
make test
  1. Run the run_tests.sh shell script:
./run_tests.sh

Running Examples

Clone this wiki locally