Personal C++ header library
- C++17 compiler
- CMake
zfstream.hpp
uses boost::iostreamsitertools.hpp
uses boost::coroutine2getopt.hpp
uses boost::program_optionsgrn.hpp
uses boost::grapheigen.hpp
uses Eigenzlib.hpp
uses zlib
The easiest way is to use Homebrew:
brew install heavywatal/tap/cxxwtl
Alternatively, you can get the source code from GitHub, and install it with CMake:
git clone https://github.com/heavywatal/cxxwtl.git
cd cxxwtl/
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=${HOME}/local
cmake --build build
cmake --install build
Header files are installed to ${CMAKE_INSTALL_PREFIX}/include/wtl/
.
This library can be imported from other CMake projects:
find_package(wtl)
target_link_libraries(${YOUR_TARGET} PRIVATE wtl::wtl)
// example.cpp
#include <iostream>
#include <wtl/math.hpp>
int main() {
std::cout << wtl::factorial(5) << std::endl;
return 0;
}
Additional include path can be specified with -I
option or CPATH
environment variable.
clang++ -std=c++17 -O2 -Wall -Wextra -Wpedantic -I${HOME}/local/include example.cpp
./a.out
# 120