Loading CMake/FindPrometheuscpp.cmake 0 → 100644 +65 −0 Original line number Original line Diff line number Diff line # FindPrometheuscpp.cmake # # Finds the prometheus-cpp library # # This will define the following variables: # # Prometheuscpp_FOUND # Prometheuscpp_INCLUDE_DIRS # Prometheuscpp_LIBRARIES # # And the following imported targets: # # prometheus-cpp::core # prometheus-cpp::pull # prometheus-cpp::push # find_package(PkgConfig) pkg_check_modules(PC_Prometheuscpp QUIET prometheus-cpp-core prometheus-cpp-pull prometheus-cpp-push) find_path(Prometheuscpp_INCLUDE_DIR NAMES prometheus/registry.h HINTS ${PC_Prometheuscpp_INCLUDE_DIRS} ) foreach(COMPONENT core pull push) string(TOUPPER ${COMPONENT} COMPONENT_UPPER) find_library(Prometheuscpp_${COMPONENT_UPPER}_LIBRARY NAMES prometheus-cpp-${COMPONENT} HINTS ${PC_Prometheuscpp_LIBRARY_DIRS} ) endforeach() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Prometheuscpp REQUIRED_VARS Prometheuscpp_CORE_LIBRARY Prometheuscpp_PULL_LIBRARY Prometheuscpp_PUSH_LIBRARY Prometheuscpp_INCLUDE_DIR VERSION_VAR PC_Prometheuscpp_VERSION ) if(Prometheuscpp_FOUND) set(Prometheuscpp_LIBRARIES ${Prometheuscpp_CORE_LIBRARY} ${Prometheuscpp_PULL_LIBRARY} ${Prometheuscpp_PUSH_LIBRARY}) set(Prometheuscpp_INCLUDE_DIRS ${Prometheuscpp_INCLUDE_DIR}) if(NOT TARGET prometheus-cpp::core) add_library(prometheus-cpp::core UNKNOWN IMPORTED) set_target_properties(prometheus-cpp::core PROPERTIES IMPORTED_LOCATION "${Prometheuscpp_CORE_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${Prometheuscpp_INCLUDE_DIR}" ) endif() foreach(COMPONENT pull push) string(TOUPPER ${COMPONENT} COMPONENT_UPPER) if(NOT TARGET prometheus-cpp::${COMPONENT}) add_library(prometheus-cpp::${COMPONENT} UNKNOWN IMPORTED) set_target_properties(prometheus-cpp::${COMPONENT} PROPERTIES IMPORTED_LOCATION "${Prometheuscpp_${COMPONENT_UPPER}_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${Prometheuscpp_INCLUDE_DIR}" ) target_link_libraries(prometheus-cpp::${COMPONENT} INTERFACE prometheus-cpp::core) endif() endforeach() endif() mark_as_advanced(Prometheuscpp_INCLUDE_DIR Prometheuscpp_CORE_LIBRARY Prometheuscpp_PULL_LIBRARY Prometheuscpp_PUSH_LIBRARY) CMakeLists.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -206,7 +206,7 @@ endif () ### prometheus-cpp::core, and curl imported targets ### prometheus-cpp::core, and curl imported targets if (GKFS_ENABLE_PROMETHEUS) if (GKFS_ENABLE_PROMETHEUS) find_package(CURL 7.68.0 REQUIRED) find_package(CURL 7.68.0 REQUIRED) find_package(prometheus-cpp REQUIRED) # >= 1.0.0 find_package(Prometheuscpp REQUIRED) endif () endif () ### Other stuff that can be found out using find_package: ### Other stuff that can be found out using find_package: Loading examples/gfind/CMakeLists.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,7 @@ set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD 17) add_executable(sfind sfind.cpp) add_executable(sfind sfind.cpp) target_link_libraries(sfind PRIVATE ZStd::ZStd) target_link_libraries(sfind PRIVATE ZStd::ZStd Threads::Threads) set_property(TARGET sfind PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET sfind PROPERTY POSITION_INDEPENDENT_CODE ON) if(GKFS_INSTALL_TESTS) if(GKFS_INSTALL_TESTS) install(TARGETS sfind install(TARGETS sfind Loading src/daemon/handler/srv_metadata.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -702,7 +702,11 @@ rpc_srv_get_dirents(hg_handle_t handle) { } } // Respond // Respond if(gkfs::config::rpc::use_dirents_compression) { out.dirents_size = transfer_size; out.dirents_size = transfer_size; } else { out.dirents_size = entries.size(); } out.err = 0; out.err = 0; GKFS_DATA->spdlogger()->debug( GKFS_DATA->spdlogger()->debug( Loading Loading
CMake/FindPrometheuscpp.cmake 0 → 100644 +65 −0 Original line number Original line Diff line number Diff line # FindPrometheuscpp.cmake # # Finds the prometheus-cpp library # # This will define the following variables: # # Prometheuscpp_FOUND # Prometheuscpp_INCLUDE_DIRS # Prometheuscpp_LIBRARIES # # And the following imported targets: # # prometheus-cpp::core # prometheus-cpp::pull # prometheus-cpp::push # find_package(PkgConfig) pkg_check_modules(PC_Prometheuscpp QUIET prometheus-cpp-core prometheus-cpp-pull prometheus-cpp-push) find_path(Prometheuscpp_INCLUDE_DIR NAMES prometheus/registry.h HINTS ${PC_Prometheuscpp_INCLUDE_DIRS} ) foreach(COMPONENT core pull push) string(TOUPPER ${COMPONENT} COMPONENT_UPPER) find_library(Prometheuscpp_${COMPONENT_UPPER}_LIBRARY NAMES prometheus-cpp-${COMPONENT} HINTS ${PC_Prometheuscpp_LIBRARY_DIRS} ) endforeach() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Prometheuscpp REQUIRED_VARS Prometheuscpp_CORE_LIBRARY Prometheuscpp_PULL_LIBRARY Prometheuscpp_PUSH_LIBRARY Prometheuscpp_INCLUDE_DIR VERSION_VAR PC_Prometheuscpp_VERSION ) if(Prometheuscpp_FOUND) set(Prometheuscpp_LIBRARIES ${Prometheuscpp_CORE_LIBRARY} ${Prometheuscpp_PULL_LIBRARY} ${Prometheuscpp_PUSH_LIBRARY}) set(Prometheuscpp_INCLUDE_DIRS ${Prometheuscpp_INCLUDE_DIR}) if(NOT TARGET prometheus-cpp::core) add_library(prometheus-cpp::core UNKNOWN IMPORTED) set_target_properties(prometheus-cpp::core PROPERTIES IMPORTED_LOCATION "${Prometheuscpp_CORE_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${Prometheuscpp_INCLUDE_DIR}" ) endif() foreach(COMPONENT pull push) string(TOUPPER ${COMPONENT} COMPONENT_UPPER) if(NOT TARGET prometheus-cpp::${COMPONENT}) add_library(prometheus-cpp::${COMPONENT} UNKNOWN IMPORTED) set_target_properties(prometheus-cpp::${COMPONENT} PROPERTIES IMPORTED_LOCATION "${Prometheuscpp_${COMPONENT_UPPER}_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${Prometheuscpp_INCLUDE_DIR}" ) target_link_libraries(prometheus-cpp::${COMPONENT} INTERFACE prometheus-cpp::core) endif() endforeach() endif() mark_as_advanced(Prometheuscpp_INCLUDE_DIR Prometheuscpp_CORE_LIBRARY Prometheuscpp_PULL_LIBRARY Prometheuscpp_PUSH_LIBRARY)
CMakeLists.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -206,7 +206,7 @@ endif () ### prometheus-cpp::core, and curl imported targets ### prometheus-cpp::core, and curl imported targets if (GKFS_ENABLE_PROMETHEUS) if (GKFS_ENABLE_PROMETHEUS) find_package(CURL 7.68.0 REQUIRED) find_package(CURL 7.68.0 REQUIRED) find_package(prometheus-cpp REQUIRED) # >= 1.0.0 find_package(Prometheuscpp REQUIRED) endif () endif () ### Other stuff that can be found out using find_package: ### Other stuff that can be found out using find_package: Loading
examples/gfind/CMakeLists.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -29,7 +29,7 @@ set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD 17) add_executable(sfind sfind.cpp) add_executable(sfind sfind.cpp) target_link_libraries(sfind PRIVATE ZStd::ZStd) target_link_libraries(sfind PRIVATE ZStd::ZStd Threads::Threads) set_property(TARGET sfind PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET sfind PROPERTY POSITION_INDEPENDENT_CODE ON) if(GKFS_INSTALL_TESTS) if(GKFS_INSTALL_TESTS) install(TARGETS sfind install(TARGETS sfind Loading
src/daemon/handler/srv_metadata.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -702,7 +702,11 @@ rpc_srv_get_dirents(hg_handle_t handle) { } } // Respond // Respond if(gkfs::config::rpc::use_dirents_compression) { out.dirents_size = transfer_size; out.dirents_size = transfer_size; } else { out.dirents_size = entries.size(); } out.err = 0; out.err = 0; GKFS_DATA->spdlogger()->debug( GKFS_DATA->spdlogger()->debug( Loading