Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/9
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
--- a/source/CMakeLists.txt
|
|
+++ b/source/CMakeLists.txt
|
|
@@ -90,20 +90,10 @@ if(UNIX)
|
|
endif()
|
|
option(ENABLE_LIBNUMA "Enable libnuma usage (Linux only)" ON)
|
|
if(ENABLE_LIBNUMA)
|
|
- find_package(Numa)
|
|
- if(NUMA_FOUND)
|
|
- link_directories(${NUMA_LIBRARY_DIR})
|
|
- list(APPEND CMAKE_REQUIRED_LIBRARIES numa)
|
|
- list(APPEND CMAKE_REQUIRED_INCLUDES ${NUMA_INCLUDE_DIR})
|
|
- list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-L${NUMA_LIBRARY_DIR}")
|
|
- check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2)
|
|
- if(NUMA_V2)
|
|
- add_definitions(-DHAVE_LIBNUMA)
|
|
- message(STATUS "libnuma found, building with support for NUMA nodes")
|
|
- list(APPEND PLATFORM_LIBS numa)
|
|
- include_directories(${NUMA_INCLUDE_DIR})
|
|
- endif()
|
|
- endif()
|
|
+ find_package(libnuma REQUIRED)
|
|
+ list(APPEND PLATFORM_LIBS ${libnuma_LIBRARIES})
|
|
+ include_directories(${libnuma_INCLUDE_DIR})
|
|
+ add_definitions(-DHAVE_LIBNUMA)
|
|
mark_as_advanced(NUMA_FOUND)
|
|
endif(ENABLE_LIBNUMA)
|
|
option(NO_ATOMICS "Use a slow mutex to replace atomics" OFF)
|