This project is known to work with
Ubuntu 16.04 LTS
/NixOS
/Fedora 29
(Any *nix should do)clang 6.0.0
(this project uses C++17 and its features)cmake 3.13.3
qt 5.12
This project is incompatible with GCC8
- Create a build directory with
mkdir build
- Enter the build directory with
cd build
- Run
CXX=clang++ cmake ..
in the build directory.- For Qt installations that are not automatically found (e.g. you receive errors during
make
orcmake
related toui_mainwindow.h
, etc)- Run
cmake -DCMAKE_PREFIX_PATH=<path to Qt prefix for cmake> .
instead. You may have to delete and re-clone this project before doing so. - A specific run could be
cmake -DCMAKE_PREFIX_PATH=/opt/Qt5.12.0/5.12.0/gcc_64/lib/cmake .
when the cmake prefix for the Qt installation is in/opt/Qt5.12.0/5.12.0/gcc_64/lib/cmake
- Run
- For using a particular compiler that is not the system default (like
clang
), two environment variables need to be setCC=clang CXX=clang++ ...
- Combining this with the command above:
CC=clang CXX=clang++ cmake -DCMAKE_PREFIX_PATH=/opt/Qt5.12.0/5.12.0/gcc_64/lib/cmake .
- To compile
autotester_gui
, add the flag-DBUILD_GUI=ON
to yourcmake
invocation. - To compile in DEBUG mode (by default - the project is in Release) mode, add
-DCMAKE_BUILD_MODE=Debug
- For Qt installations that are not automatically found (e.g. you receive errors during
- Run
make
in the build directory. The build can be parallelized withmake -j<num>
, e.g.make -j4
.
Please read the Contribution Guidelines when formatting your pull request.
run-all-tests.sh
is included in the root folder to run the various system tests through autotester.
The autotester output will be created in tests/system_tests/output
.
You might need to use chmod +x run-all-tests.sh
to change access permission of run-all-tests.sh
Paste analysis.xsl
from tests/
into tests/system_tests/output
and then open the individual test files in Firefox to view the test output graphically. Chrome won't allow you to do so.
Alternatively:
grep -B 14 -n -r /failed tests/system_tests/output/
will check for failed cases and output the 14 lines before each failed case to see the context surrounding it.
This can be chained into more complex calls: to check for any tests that failed that don't have the word "Pattern":
grep -B 14 -n -r /failed tests/system_tests/output/ | grep id | grep -v Pattern
To get profiling output for SPA, you will need either (valgrind
(necessary) + kcachegrind
(optional)) or gprof
. Currently, the valgrind
option seems to be more useful - gprof
is not reporting execution times correctly.
- Run
cmake
with the additional flag-DPROFILING=ON
, and build withmake
as per before - (Option 1):
- Run
valgrind --tool=callgrind build/src/profiling/profiling
to produce a profiling output file - Use
kcachegrind <generated file name>
to visualize the output
- Run
- (Option 2):
- Run
gprof build/src/profiling/profiling > gprof.out
to get gprof output
- Run
To change what's being profiled, change the code inside src/profiling/src/main.cpp
- Run
doxygen
in the root project folder. - Documentation should be generated in
doxygen-docs
. doxygen-docs/index.html
(open in browser) will lead to the documentation homepage.