1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 : ${CMAKE_MAKEFILE_GENERATOR:=ninja}
7 # (needed due to CMAKE_BUILD_TYPE != Gentoo)
8 CMAKE_MIN_VERSION=3.7.0-r1
9 PYTHON_COMPAT=( python2_7 )
11 inherit cmake-multilib git-r3 python-any-r1
13 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
14 HOMEPAGE="https://openmp.llvm.org"
16 EGIT_REPO_URI="https://git.llvm.org/git/openmp.git
17 https://github.com/llvm-mirror/openmp.git"
18 EGIT_BRANCH="release_50"
20 # Additional licenses:
21 # - MIT-licensed Intel code,
22 # - LLVM Software Grant from Intel.
24 LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
27 IUSE="hwloc ompt test"
29 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
31 # - dev-python/lit provides the test runner
32 # - sys-devel/llvm provide test utils (e.g. FileCheck)
33 # - sys-devel/clang provides the compiler to run tests
37 $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
39 >=sys-devel/clang-3.9.0
42 # least intrusive of all
43 CMAKE_BUILD_TYPE=RelWithDebInfo
46 has_version "dev-python/lit[${PYTHON_USEDEP}]"
50 use test && python-any-r1_pkg_setup
53 multilib_src_configure() {
54 local libdir="$(get_libdir)"
56 -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
57 -DLIBOMPTARGET_LIBDIR_SUFFIX="${libdir#lib}"
58 -DLIBOMP_USE_HWLOC=$(usex hwloc)
59 -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
60 # do not install libgomp.so & libiomp5.so aliases
61 -DLIBOMP_INSTALL_ALIASES=OFF
62 # disable unnecessary hack copying stuff back to srcdir
63 -DLIBOMP_COPY_EXPORTS=OFF
64 -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")"
66 cmake-utils_src_configure
71 local -x LIT_PRESERVES_TMP=1
73 cmake-utils_src_make check-libomp