[x265] [PATCH] cmake: ignore older versions of libnuma
Steve Borho
steve at borho.org
Mon Mar 2 17:21:11 CET 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1425312277 21600
# Mon Mar 02 10:04:37 2015 -0600
# Node ID cc036a86b8dba2d79914e339b09abe4806255e0e
# Parent 0adf8439fd332ba498b0e07b528e67a805c84820
cmake: ignore older versions of libnuma
diff -r 0adf8439fd33 -r cc036a86b8db source/CMakeLists.txt
--- a/source/CMakeLists.txt Thu Feb 26 16:37:50 2015 -0600
+++ b/source/CMakeLists.txt Mon Mar 02 10:04:37 2015 -0600
@@ -58,11 +58,15 @@
endif()
find_package(Numa)
if(NUMA_FOUND)
- add_definitions(-DHAVE_LIBNUMA)
- message(STATUS "libnuma found, building with support for NUMA nodes")
- set(PLATFORM_LIBS ${PLATFORM_LIBS} ${NUMA_LIBRARY})
- link_directories(${NUMA_LIBRARY_DIR})
- include_directories(${NUMA_INCLUDE_DIR})
+ list(APPEND CMAKE_REQUIRED_LIBRARIES ${NUMA_LIBRARY})
+ 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")
+ set(PLATFORM_LIBS ${PLATFORM_LIBS} ${NUMA_LIBRARY})
+ link_directories(${NUMA_LIBRARY_DIR})
+ include_directories(${NUMA_INCLUDE_DIR})
+ endif()
endif()
mark_as_advanced(LIBRT NUMA_FOUND)
endif(UNIX)
More information about the x265-devel
mailing list