Skip to content

Fix: add some missing *_LIBRARY_DIRS to target_link_directories() #785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
37 changes: 22 additions & 15 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ function(build_umf_ipc_example name)
${EX_NAME} PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/utils
${UMF_CMAKE_SOURCE_DIR}/include)

target_link_directories(${EX_NAME} PRIVATE ${LIBHWLOC_LIBRARY_DIRS})
target_link_directories(${EX_NAME} PRIVATE ${LIBHWLOC_LIBRARY_DIRS}
${TBB_LIBRARY_DIRS})
endforeach(loop_var)
endfunction()

Expand All @@ -192,7 +193,7 @@ function(add_umf_ipc_example script)
endif()
endfunction()

if(LINUX)
if(LINUX AND UMF_POOL_SCALABLE_ENABLED)
build_umf_ipc_example(ipc_ipcapi)
add_umf_ipc_example(ipc_ipcapi_anon_fd)
add_umf_ipc_example(ipc_ipcapi_shm)
Expand Down Expand Up @@ -252,23 +253,26 @@ if(LINUX)
set_tests_properties(${EXAMPLE_NAME} PROPERTIES
SKIP_RETURN_CODE ${UMF_TEST_SKIP_RETURN_CODE})

set(EXAMPLE_NAME umf_example_custom_file_provider)
if(UMF_POOL_SCALABLE_ENABLED)
set(EXAMPLE_NAME umf_example_custom_file_provider)

add_umf_executable(
NAME ${EXAMPLE_NAME}
SRCS custom_file_provider/custom_file_provider.c
LIBS umf ${LIBHWLOC_LIBRARIES})
add_umf_executable(
NAME ${EXAMPLE_NAME}
SRCS custom_file_provider/custom_file_provider.c
LIBS umf ${LIBHWLOC_LIBRARIES})

target_include_directories(
${EXAMPLE_NAME} PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/utils
${UMF_CMAKE_SOURCE_DIR}/include)
target_include_directories(
${EXAMPLE_NAME} PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/utils
${UMF_CMAKE_SOURCE_DIR}/include)

target_link_directories(${EXAMPLE_NAME} PRIVATE ${LIBHWLOC_LIBRARY_DIRS})
target_link_directories(${EXAMPLE_NAME} PRIVATE
${LIBHWLOC_LIBRARY_DIRS} ${TBB_LIBRARY_DIRS})

add_test(
NAME ${EXAMPLE_NAME}
COMMAND ${EXAMPLE_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_test(
NAME ${EXAMPLE_NAME}
COMMAND ${EXAMPLE_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif()

if(UMF_POOL_JEMALLOC_ENABLED)
set(EXAMPLE_NAME umf_example_dram_and_fsdax)
Expand All @@ -278,6 +282,9 @@ if(LINUX)
SRCS dram_and_fsdax/dram_and_fsdax.c
LIBS umf jemalloc_pool)

target_link_directories(${EXAMPLE_NAME} PRIVATE
${LIBHWLOC_LIBRARY_DIRS})

add_test(
NAME ${EXAMPLE_NAME}
COMMAND ${EXAMPLE_NAME}
Expand Down
Loading