1# Note: This file lives in git at 'tlm/third-party-CMakeLists.txt'.
2# It is copied by repo into third_party/CMakeLists.txt, so should be
3# considered read-only in that location.
4
5# Ensure the third party code is position independent because our
6# code is always built as position-independent.
7# This setting is specifically required for HdrHistogram_c.
8set(CMAKE_POSITION_INDEPENDENT_CODE ON)
9
10add_subdirectory(gsl-lite)
11target_include_directories(gsl_lite INTERFACE ${gsl_lite_SOURCE_DIR}/include)
12
13add_subdirectory(HdrHistogram_c)
14add_subdirectory(spdlog)
15
16# Define macro which renames spdlog's severity levels
17set(CUSTOM_LEVELS "{\"TRACE\",\ \"DEBUG\",\ \"INFO\",\ \"WARNING\",\ \"ERROR\",\ \"CRITICAL\",\ \"OFF\"}")
18target_compile_definitions(spdlog INTERFACE -DSPDLOG_LEVEL_NAMES=${CUSTOM_LEVELS})
19