cxx utils code
![LGTM lgtm-badge](https://camo.githubusercontent.com/65831030f921af043d36afb6ba0e6ab0cc7da610fb0c9f2b1f4cc27a309a4be4/68747470733a2f2f696d672e736869656c64732e696f2f6c67746d2f67726164652f6370702f672f61746672616d65776f726b2f61746672616d655f7574696c732e7376673f6c6f676f3d6c67746d266c6f676f57696474683d3138)
Target System |
Toolchain |
Note |
Linux |
GCC |
|
Linux |
GCC |
With MbedTLS |
Linux |
GCC-11 |
|
Linux |
Clang |
With libc++ |
Linux |
GCC 4.8 |
|
MinGW64 |
GCC |
Static linking |
MinGW64 |
GCC |
Dynamic linking |
Windows |
Visual Studio 2019 |
Static linking |
Windows |
Visual Studio 2019 |
Dynamic linking |
Windows |
Visual Studio 2017 |
Legacy,Static linking |
macOS |
AppleClang |
With libc++ |
- require cmake 3.16.0 or upper
- require gcc 4.8+/clang 3.8+/apple clang 6.0+/MSVC 14.10+
# clone and make build directory
git clone --single-branch --depth=1 -b master https://github.com/atframework/atframe_utils.git
mkdir atframe_utils/build && cd atframe_utils/build
# run cmake
# cmake <atframe_utils dir> [options...]
cmake .. -DPROJECT_ENABLE_SAMPLE=YES -DPROJECT_ENABLE_UNITTEST=YES -DPROJECT_ENABLE_TOOLS=ON # -DCMAKE_INSTALL_PREFIX=<install prefix>
# build
cmake --build . # using clang or gcc
# cmake --build . --config RelWithDebInfo # using MSVC
# run unit test
ctest . -V
# run unit test
cmake --build . --target INSTALL # using clang or gcc
# cmake --build . --config RelWithDebInfo --target INSTALL # using MSVC
Option |
Description |
BUILD_SHARED_LIBS=YES|NO |
[default=NO] Build dynamic library |
LIBUNWIND_ENABLED=YES|NO |
[default=NO] Enable and using libunwind for callstack unwind |
LOG_WRAPPER_ENABLE_LUA_SUPPORT=YES|NO |
[default=YES] Enable lua support for log system |
LOG_WRAPPER_CHECK_LUA=YES|NO |
[default=YES] Enable checking for lua support |
LOG_WRAPPER_ENABLE_STACKTRACE=YES|NO |
[default=YES] Enable stack trace for log system |
ENABLE_MIXEDINT_MAGIC_MASK=0-8 |
[default=0] Set mixed int mask |
CRYPTO_DISABLED=YES|NO |
[default=NO] Disable crypto and DH/ECDH support |
CRYPTO_USE_OPENSSL=YES|NO |
[default=NO] Using openssl for crypto and DH/ECDH support, and close auto detection |
CRYPTO_USE_MBEDTLS=YES|NO |
[default=NO] Using mbedtls for crypto and DH/ECDH support, and close auto detection |