KIWAKU requires a C++20 compliant compiler. Here is the current minimal compiler version supported:
| Compiler | Version |
|---|---|
| g++ | 11 or above |
| clang++ | 14 or above |
KIWAKU is available on GitHub and can be retrieved via the following command:
$ git clone https://github.com/jfalcou/kiwaku.git
This retrieves the main branch which contains the latest stable version. Development happens live on main so if you need stability, use a tagged versions.
You can install KIWAKU directly via CPM. After adding CPM to your CMake setup, just add the following commands:
If you didn't fetched KIWAKU from a package manager, you'll need to install it via our CMake system.
Create a build directory here and enter it. Once in the build directory, you can use CMake to generate the build system for KIWAKU.
We recommend using Ninja but any build system is fine.
$ mkdir build $ cd build $ cmake .. -G Ninja
Once CMake completes, you can use the install target to build and install KIWAKU. By default, the library will be installed in the /usr/localdirectory, thus requiring root privileges on Linux.
$ ninja install
You can select an alternative installation path by specifying the CMAKE_INSTALL_PREFIX option at configuration time.
$ cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=path/to/install $ ninja install
You can rebuild KIWAKU documentation if you have the latest version of Doxygen installed using the doxygen target:
The resulting HTML files will be available in the doc folder.
Once installed, you can compile the following code to check if everything is alright.
To do so, use your C++20 aware favorite compiler, for example g++.
$ g++ test.cpp -std=c++20 -O3 -DNDEBUG -I/path/to/install/include -o output
Don't forget the --std=c++20 option to be sure to activate C++20 support. If you use a different compiler, check your compiler user's manual to use the proper option.
You can notice we use the -O3 -DNEDBUG options. This is required if you want to be sure to get the best performance out of KIWAKU.
The -DNDEBUG setting can be omitted but then asserts will be inserted into the code to prevent logic errors.
Once done, execute the binary adn you should be looking at the following results:
$ ./output
Test matrix:
[ 1 2 3 ]
[ 4 5 6 ]
[ 7 8 9 ]
[ 10 11 12 ]
That's it, KIWAKU is properly installed and ready to use.