[x265] [PATCH] Enabling the option to compile without libNUMA support in Linux

Pradeep Ramachandran pradeep at multicorewareinc.com
Fri Aug 21 10:19:55 CEST 2015


Please ignore this patch - just realized that NO_ATOMICS also got
incorrectly pulled in. Sending a fixed patch.

Pradeep Ramachandran, PhD
Solution Architect,
Multicoreware Inc.
Ph:   +91 99627 82018

On Fri, Aug 21, 2015 at 7:16 PM, Pradeep Ramachandran <
pradeep at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Pradeep Ramachandran <pradeep at multicorewareinc.com>
> # Date 1440164786 14400
> #      Fri Aug 21 09:46:26 2015 -0400
> # Node ID 8ef6b4bf6865d0eb2d3b5eb4d988f62487403ac3
> # Parent  f63273fa3137fef2f6898c686b68ee12608acd31
> Enabling the option to compile without libNUMA support in Linux.
>
> Need to find a good way to do this for Windows builds
>
> diff -r f63273fa3137 -r 8ef6b4bf6865 source/CMakeLists.txt
> --- a/source/CMakeLists.txt     Thu Aug 20 11:13:25 2015 +0530
> +++ b/source/CMakeLists.txt     Fri Aug 21 09:46:26 2015 -0400
> @@ -75,23 +75,26 @@
>      if(LIBDL)
>          list(APPEND PLATFORM_LIBS dl)
>      endif()
> -    find_package(Numa)
> -    if(NUMA_FOUND)
> -        link_directories(${NUMA_LIBRARY_DIR})
> -        list(APPEND CMAKE_REQUIRED_LIBRARIES numa)
> -        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})
> +    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)
> +            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()
> -    endif()
> -    mark_as_advanced(LIBRT NUMA_FOUND)
> -    option(NO_ATOMICS "Use a slow mutex to replace atomics" OFF)
> -    if(NO_ATOMICS)
> -        add_definitions(-DNO_ATOMICS=1)
> -    endif(NO_ATOMICS)
> +        mark_as_advanced(LIBRT NUMA_FOUND)
> +        option(NO_ATOMICS "Use a slow mutex to replace atomics" OFF)
> +        if(NO_ATOMICS)
> +            add_definitions(-DNO_ATOMICS=1)
> +        endif(NO_ATOMICS)
> +    endif(ENABLE_LIBNUMA)
>  endif(UNIX)
>
>  if(X64 AND NOT WIN32)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150821/dfc9afae/attachment.html>


More information about the x265-devel mailing list