[x265] [PATCH] cmake: ignore older versions of libnuma

Dzung.Hoang at freescale.com Dzung.Hoang at freescale.com
Mon Mar 2 23:10:27 CET 2015


Your patch of CMakeLists.txt works for me. Thanks for the quick resolution.

Regards,
- Dzung Hoang


________________________________________
From: x265-devel <x265-devel-bounces at videolan.org> on behalf of Steve Borho <steve at borho.org>
Sent: Monday, March 2, 2015 10:21 AM
To: x265-devel at videolan.org
Subject: [x265] [PATCH] cmake: ignore older versions of libnuma

# 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)
_______________________________________________
x265-devel mailing list
x265-devel at videolan.org
https://mailman.videolan.org/listinfo/x265-devel


More information about the x265-devel mailing list