-
- Downloads
Update scripts to build/test VecCore with CTest
The script can be generically called as ctest -VV -S cmake/TestVecCore.cmake from the top directory of the repository. There are several options to customize the build, the main ones are: -DCOVERAGE=1 Enables test coverage analysis with gcov -DMEMCHECK=1 Enables memory checking with valgrind -DSTATIC_ANALYSIS=1 Enables static analysis with clang-tidy -DINSTALL=1 Enables an extra step to call make install When enabling coverage, a report is generated by default in the coverage/ directory inside the build directory. The results can be viewed by opening the file coverage/coverage_details.html. This step can be disabled by passing -DGCOVR=0 to ctest. It is recommended to use a build with debug info and low optimizations to generate the coverage analysis. The configuration can also be specified directly on the command line via the -C option. For example, to run a coverage build with less verbose output, and using AVX2 SIMD ISA, run: ctest -V -C RelWithDebInfo -DCOVERAGE=1 -S cmake/TestVecCore.cmake,AVX2 Some environment variables can also influence the behavior of the script, like CC, CXX, CMAKE_GENERATOR, CTEST_CONFIGURATION_TYPE, CMAKE_BUILD_PARALLEL_LEVEL, CTEST_PARALLEL_LEVEL, and CMAKE_ARGS. These are mostly self-explanatory and can be used to override the provided defaults. For example, to build with the clang compiler and use Ninja as CMake generator, one can run: env CC=clang CXX=clang++ CMAKE_GENERATOR=Ninja ctest -V -S cmake/TestVecCore.cmake Finally, the script tries to load configuration files from the .ci subdirectory in the source directory. The default configuration is used if no specific configuration is found for the detected OS. For example, on Ubuntu, a file named ubuntu.cmake will be used if present instead of config.cmake. The script also tries to detect a version, so, for example, on Alma, one could use almalinux8.cmake which would have higher precedence than almalinux.cmake.