2018-05-04 07:06:30 +08:00
|
|
|
set(FDBMONITOR_SRCS ConvertUTF.h SimpleIni.h fdbmonitor.cpp)
|
|
|
|
|
|
|
|
add_executable(fdbmonitor ${FDBMONITOR_SRCS})
|
2019-04-05 16:38:07 +08:00
|
|
|
strip_debug_symbols(fdbmonitor)
|
2019-03-06 08:06:46 +08:00
|
|
|
assert_no_version_h(fdbmonitor)
|
2019-01-29 13:44:48 +08:00
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(fdbmonitor rt)
|
|
|
|
endif()
|
2019-01-11 06:31:11 +08:00
|
|
|
# FIXME: This include directory is an ugly hack. We probably want to fix this
|
|
|
|
# as soon as we get rid of the old build system
|
|
|
|
target_include_directories(fdbmonitor PRIVATE ${CMAKE_BINARY_DIR}/fdbclient)
|
2018-05-04 07:06:30 +08:00
|
|
|
|
2019-03-02 06:13:16 +08:00
|
|
|
fdb_install(TARGETS fdbmonitor DESTINATION fdbmonitor COMPONENT server)
|
2019-03-20 02:56:59 +08:00
|
|
|
|
2019-03-20 04:26:43 +08:00
|
|
|
# Create a local sandbox for quick manual testing without simulator
|
2019-03-20 02:56:59 +08:00
|
|
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/sandbox/data)
|
|
|
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/sandbox/logs)
|
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/Sandbox.conf.cmake
|
|
|
|
${CMAKE_BINARY_DIR}/sandbox/foundationdb.conf)
|
|
|
|
|
|
|
|
# this is not portable on Windows - but fdbmonitor isn't built there anyways...
|
|
|
|
add_custom_target(clean_sandbox
|
|
|
|
COMMAND rm -rf ${CMAKE_BINARY_DIR}/sandbox/data/* && rm -rf ${CMAKE_BINARY_DIR}/sandbox/logs/*
|
|
|
|
COMMENT "Cleaning existing sandbox")
|
|
|
|
|
|
|
|
add_custom_target(start_sandbox
|
|
|
|
COMMAND ${CMAKE_BINARY_DIR}/bin/fdbmonitor --conffile ${CMAKE_BINARY_DIR}/sandbox/foundationdb.conf
|
|
|
|
--lockfile ${CMAKE_BINARY_DIR}/sandbox/fdbmonitor.lock)
|
|
|
|
|
|
|
|
add_dependencies(start_sandbox fdbmonitor fdbserver)
|