Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,18 @@ include_directories(${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/third_party/sict/include/
)

set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${PROJECT_SOURCE_DIR}/third_party/fast_float/include/")
set(SIMM_FASTFLOAT_ROOT "/tmp/simm-fast_float")
set(SIMM_FASTFLOAT_INCLUDE_DIR "${SIMM_FASTFLOAT_ROOT}/include")
file(MAKE_DIRECTORY "${SIMM_FASTFLOAT_ROOT}")
if(NOT EXISTS "${SIMM_FASTFLOAT_INCLUDE_DIR}")
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink
"${PROJECT_SOURCE_DIR}/third_party/fast_float/include"
"${SIMM_FASTFLOAT_INCLUDE_DIR}"
)
endif()
set(FASTFLOAT_INCLUDE_DIR "${SIMM_FASTFLOAT_INCLUDE_DIR}" CACHE PATH "fast_float include path" FORCE)
set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${SIMM_FASTFLOAT_INCLUDE_DIR}")

# set GNU SOURCE to fix folly dependency
add_compile_definitions(_GNU_SOURCE)
Expand All @@ -150,6 +161,7 @@ add_subdirectory(tools)
if(ENABLE_TESTS)
message(STATUS "Building tests ...")
add_compile_definitions(SIMM_UNIT_TEST)
include_directories(${PROJECT_SOURCE_DIR}/third_party/gtest/googletest/include)
add_subdirectory(tests)
endif()

Expand Down
9 changes: 8 additions & 1 deletion src/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ file(GLOB MODULE_SRC
)

add_library(${MODULE_NAME}_static STATIC ${MODULE_SRC})
# PRIVATE means that the libraries are only used by this target and
if(ENABLE_TESTS)
target_compile_definitions(${MODULE_NAME}_static PRIVATE SIMM_UNIT_TEST)
target_include_directories(${MODULE_NAME}_static PRIVATE
${PROJECT_SOURCE_DIR}/third_party/gtest/googletest/include
)
endif()

# PRIVATE means that the libraries are only used by this target and
# not propagated to targets that link against this one.
#
# **Caution** about sict, it maybe loaded by shared library at runtime, so
Expand Down
1 change: 1 addition & 0 deletions src/client/clnt_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DEFINE_bool(clnt_use_k8s, true, "simm client in K8S env");
DEFINE_uint32(clnt_thread_pool_size, 10, "simm client thread pool size");
DEFINE_uint32(clnt_cm_addr_check_interval_inSecs, 10,
"simm client backgroud thread(check cm address update) trigger interval in seconds, default is 10s");
DEFINE_uint32(clnt_syncreq_retry_count, 2, "simm client sync requests retry count");
DEFINE_int32(clnt_sync_req_timeout_ms, 1000, "simm client sync request timeout in milliseconds, default is 1s");
DEFINE_int32(clnt_async_req_timeout_ms, 3000, "simm client sync request timeout in milliseconds, default is 3s");
DEFINE_string(clnt_log_file, "/var/log/simm/simm_clnt.log", "simm client log file path & name");
Loading
Loading