Merge branch 'master' of gitlab.psi.ch:Pmodules/buildblocks

This commit is contained in:
2017-04-24 13:55:03 +02:00
4 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1 @@
gtest/1.7.0 unstable b:cmake b:gcc/5.4.0

35
Compiler/gtest/build Executable file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env modbuild
declare -a config_args=()
pbuild::set_docfiles \
CHANGES \
CONTRIBUTORS \
LICENSE \
README
pbuild::configure() {
cmake \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=RELEASE \
"${config_args[@]}" \
"${MODULE_SRCDIR}"
}
pbuild::install() {
local -r _include_srcdir="${MODULE_SRCDIR}/include/gtest"
local -r _include_dstdir="${PREFIX}/include/gtest"
if [[ -e "${_include_dstdir}" ]]; then
chmod -R u+w "${_include_dstdir}"
fi
mkdir -p "${_include_dstdir}"
cp -rv "${_include_srcdir}"/* "${_include_dstdir}"
local -r _lib_dstdir="${PREFIX}/lib"
mkdir -p "${_lib_dstdir}"
cp -v *.a "${_lib_dstdir}"
}
pbuild::add_to_group 'Compiler'
pbuild::make_all

10
Compiler/gtest/modulefile Normal file
View File

@@ -0,0 +1,10 @@
#%Module1.0
module-whatis "Google's C++ test framework"
module-url "https://github.com/google/googletest/"
module-license "See ${PREFIX}/share/doc/gtest/LICENSE"
module-maintainer "Achim Gsell <achim.gsell@psi.ch>"
module-help "
See https://github.com/google/googletest/blob/master/googletest/docs/Primer.md
"