Skip to content
/ cxxwtl Public
forked from heavywatal/cxxwtl

🤘 wtl: Personal C++ header library

License

Notifications You must be signed in to change notification settings

ruping/cxxwtl

 
 

Repository files navigation

cxxwtl

Personal C++ header library

Dependency

Installation

The easiest way is to use Homebrew/Linuxbrew:

% 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/
% mkdir build
% cd build/
% cmake -DCMAKE_INSTALL_PREFIX=${HOME}/local ..
% make install

Header files are installed to ${CMAKE_INSTALL_PREFIX}/include/wtl/. This library can be used with find_package() from other CMake projects.

Usage

// 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++14 -O2 -Wall -Wextra -Wpedantic -I${HOME}/local/include example.cpp
% ./a.out
120

About

🤘 wtl: Personal C++ header library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 98.4%
  • CMake 1.6%