The CZICheck-project is using the CMake build system. It is a cross-platform build system that can generate native build files for many platforms and IDEs. The following external packages are required for building.
component | description | referenced via | comment |
---|---|---|---|
cli11 | command line parser | CMake's FetchContent | |
libCZI | CZI file format library | CMake's FetchContent | |
XercesC | validating XML parser | CMake's find_package | If the XercesC-package cannot be found, the checker "xmlmetadataschema" will be disabled and not be available. |
Building CZICheck is done by running those commands. Assume that the current working directory is the root of the CZICheck-project.
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
When running the CMake-configure step, a line stating whether the XercesC-package was found or not will be printed.
If it is not found, you will find a line
XercesC library not found, the checker 'xmlmetadataschema' will **not** be available
whereas if it was found, it will read
XercesC library available -> version: 3.2.4
XercesC library found, the checker 'xmlmetadataschema' will be available
The resulting binary is then located in the build/CZICheck directory.
A recording of the build process is available here.
For installing the XercesC-package it is recommended to use the package-manager of your operating system.
For example, on Ubuntu XercesC can be installed by running
sudo apt-get install libxerces-c-dev
On Windows, the vcpkg-package-manager can be used. Running this command will install the XercesC-package (adjust the triplet to your configuration).
vcpkg install xerces-c --triplet x64-windows-static
For configuring the tests, the CMake-option CZICHECK_BUILD_TESTS has to be set to ON. This can be done by adding the option to the CMake-configure step.
cmake .. -DCMAKE_BUILD_TYPE=Release -DCZICHECK_BUILD_TESTS=ON
During the CMake-run, the test-data will be downloaded (to the build-directory) and the tests will be configured.
The tests can then be run by executing the following command in the build-directory.
ctest -C Release