buildblocks/gtest: added
This commit is contained in:
1
Programming/gtest/1/variants
Normal file
1
Programming/gtest/1/variants
Normal file
@@ -0,0 +1 @@
|
||||
gtest/1.7.0 unstable b:cmake
|
||||
@@ -1,7 +1,36 @@
|
||||
#!/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"
|
||||
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 'Programming'
|
||||
pbuild::set_runtime_dependencies ""
|
||||
pbuild::set_build_dependencies "${COMPILER}"
|
||||
pbuild::make_all
|
||||
|
||||
|
||||
10
Programming/gtest/modulefile
Normal file
10
Programming/gtest/modulefile
Normal 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
|
||||
"
|
||||
Reference in New Issue
Block a user