An example CAPD-based project that depends on the CAPD library installed already in the system.
In order to perform the build it is necessary to have git, cmake and make tools installed as well as C++ compiler with C++17 support.
Let CAPD library be installed in <path> directory. In order to set up and run the example it is necessary to perform the following commands.
-
Clone this repository:
git clone https://github.com/CAPDGroup/CAPD_example_standard -
Configure and build the project (the option
-DCMAKE_PREFIX_PATH=<path>is not necessary if CAPD library is installed in standard directory such as/usror/usr/local):cd CAPD_example_standard mkdir build cd build cmake .. -DCMAKE_PREFIX_PATH=<path> makeThe build can be made quicker by using
make -j <n>instead ofmake, where<n>is the number of parallel jobs. -
Run the application
./capd_example
Source files of the example are placed in src directory, with the entry point located in main.cpp file. In order to extend your project with multiple source files, no changes in CMakeLists.txt file are needed. You just put your source files directly into src folder and CMake build system will find them automatically. In order to rebuild your application after introducing changes into the code, it is only necessary to call make in build directory.