github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/third_party/eigen3/BUILD (about)

     1  # Description:
     2  #   Eigen is a C++ template library for linear algebra: vectors,
     3  #   matrices, and related algorithms.
     4  
     5  licenses([
     6      # Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code.
     7      #       We've taken special care to not reference any restricted code.
     8      "reciprocal",  # MPL2
     9      "notice",  # Portions BSD
    10  ])
    11  
    12  exports_files(["LICENSE"])
    13  
    14  load("//third_party/mkl:build_defs.bzl", "if_mkl")
    15  
    16  EIGEN3_THIRD_PARTY_HEADERS = [
    17      "Eigen/Core",
    18      "Eigen/LU",
    19      "Eigen/Cholesky",
    20      "Eigen/Eigenvalues",
    21      "Eigen/QR",
    22      "Eigen/SVD",
    23      "unsupported/Eigen/MatrixFunctions",
    24      "unsupported/Eigen/SpecialFunctions",
    25      "unsupported/Eigen/CXX11/ThreadPool",
    26      "unsupported/Eigen/CXX11/Tensor",
    27      "unsupported/Eigen/CXX11/FixedPoint",
    28  ] + glob(["unsupported/Eigen/CXX11/src/FixedPoint/*.h"])
    29  
    30  cc_library(
    31      name = "eigen3",
    32      hdrs = EIGEN3_THIRD_PARTY_HEADERS,
    33      includes = if_mkl(["./mkl_include"]),
    34      visibility = ["//visibility:public"],
    35      deps = [
    36          "@eigen_archive//:eigen",
    37          "@local_config_sycl//sycl",
    38      ],
    39  )
    40  
    41  filegroup(
    42      name = "all_files",
    43      srcs = glob(
    44          ["**/*"],
    45          exclude = ["**/OWNERS"],
    46      ),
    47      visibility = ["//tensorflow:__subpackages__"],
    48  )
    49  
    50  filegroup(
    51      name = "eigen_third_party_header_files",
    52      srcs = EIGEN3_THIRD_PARTY_HEADERS,
    53      visibility = ["//visibility:public"],
    54  )
    55  
    56  genrule(
    57      name = "install_eigen_headers",
    58      srcs = [
    59          "@eigen_archive//:eigen_header_files",
    60          ":eigen_third_party_header_files",
    61      ],
    62      outs = ["include"],
    63      cmd = """
    64      mkdir $@
    65      for f in $(SRCS); do
    66        d="$${f%/*}"
    67        d="$${d#*external/eigen_archive/}"
    68  
    69        mkdir -p "$@/$${d}"
    70        cp "$${f}" "$@/$${d}/"
    71      done
    72      """,
    73      tags = ["manual"],
    74  )