- header-only.
- cross-platform.
- simple to use.
- high-coverage test cases.
-
You can copy
nly/nly
to your project, becausenly
is header-only project.- If you use
nly
in this way, then you need to manually include the third-party libraries required bynly
.
- If you use
-
You can put nly to your cmake project, for example:
cmake_minimum_required(VERSION 3.0.0) project(your_target VERSION 0.1.0) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) add_subdirectory(nly) add_executable(your_target xxx.cpp) target_link_libraries(your_target PRIVATE nly)
- The third-party libraries that
nly
depends on are all disabled by default, and can be enabled according to the user's needs. The following is the list of third-party libraries and the variable names used to enable them.
name | variable |
---|---|
fmt | ADD_FMT_VIA_NLY |
boost | ADD_BOOST_VIA_NLY |
thread-pool | ADD_BS_THREAD_POOL_VIA_NLY |
json | ADD_NLOHMANN_JSON_VIA_NLY |
cpp-httplib | ADD_CPP_HTTP_LIB_VIA_NLY |
redis-plus-plus | ADD_REDIS_PLUS_PLUS_VIA_NLY |
# nly/upstream/boost
$ git submodule update --init --recursive
- Set
ENABLE_NLY_UNIT_TEST
toON
to enable unit test.
plantform | compiler | result |
---|---|---|
windows 10 | VS2019 | ✅ |
ubuntu | GCC 11.4.0 | ✅ |