Unverified Commit 7c891bca authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

cmake: fix jmalloc find module

Setting the properly the JMALLOC_LIBRARIES variable into the find module
made possible to avoid the conditonal inclusion of the library
parent 80a35953
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ find_path(JEMALLOC_ROOT_DIR
    NAMES include/jemalloc/jemalloc.h
    )

find_library(JEMALLOC_LIBRARIES
find_library(JEMALLOC_LIBRARY
    NAMES jemalloc
    HINTS ${JEMALLOC_ROOT_DIR}/lib
    )
@@ -33,12 +33,15 @@ find_path(JEMALLOC_INCLUDE_DIR

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
    JEMALLOC_LIBRARIES
    JEMALLOC_LIBRARY
    JEMALLOC_INCLUDE_DIR
    )

mark_as_advanced(
    JEMALLOC_ROOT_DIR
    JEMALLOC_LIBRARIES
    JEMALLOC_LIBRARY
    JEMALLOC_INCLUDE_DIR
)

set(JMALLOC_LIBRARIES ${JMALLOC_LIBRARY})
set(JMALLOC_INCLUDE_DIRS ${JMALLOC_INCLUDE_DIR})
 No newline at end of file
+1 −3
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@ target_link_libraries(adafs_daemon
    ${MERCURY_UTIL_LIBRARIES}
    ${MARGO_LIBRARIES}
    ${Boost_LIBRARIES}
    ${JEMALLOC_LIBRARIES}
    Threads::Threads
    )
if (${JEMALLOC_FOUND})
    target_link_libraries(adafs_daemon ${JEMALLOC_LIBRARIES})
endif ()