Merge branch '55-gtest-build-new-variants-for-1-8-1-with-gcc-5-5-0-6-4-0-7-4-0-8-3-0-9-2-0' into 'master'
Resolve "gtest: build new variants for 1.8.1 with gcc/{5.5.0,6.4.0,7.4.0,8.3.0,9.2.0}"
Closes #55
See merge request Pmodules/buildblocks!69
This commit is contained in:
@@ -1,44 +1,32 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
pbuild::set_download_url "https://github.com/google/googletest/archive/release-1.7.0.tar.gz"
|
||||
|
||||
declare -a config_args=()
|
||||
|
||||
case "${OS}" in
|
||||
Darwin )
|
||||
#config_args+=( '-DCMAKE_OSX_SYSROOT=/' )
|
||||
#config_args+=( "-DCMAKE_OSX_DEPLOYMENT_TARGET=''" )
|
||||
;;
|
||||
esac
|
||||
|
||||
pbuild::install_docfiles \
|
||||
CHANGES \
|
||||
CONTRIBUTORS \
|
||||
LICENSE \
|
||||
README
|
||||
|
||||
pbuild::configure() {
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
|
||||
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||
"${config_args[@]}" \
|
||||
"${SRC_DIR}"
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
local -r _include_srcdir="${SRC_DIR}/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::set_download_url "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"
|
||||
pbuild::add_to_group 'Compiler'
|
||||
pbuild::make_all
|
||||
|
||||
if (( V_MAJOR == 1 )) && (( V_MINOR <= 7 )); then
|
||||
pbuild::install_docfiles \
|
||||
CHANGES \
|
||||
CONTRIBUTORS \
|
||||
LICENSE \
|
||||
README
|
||||
|
||||
pbuild::install() {
|
||||
local -r _include_srcdir="${SRC_DIR}/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}"
|
||||
}
|
||||
else
|
||||
pbuild::install_docfiles \
|
||||
CONTRIBUTING.md \
|
||||
LICENSE \
|
||||
README.md
|
||||
fi
|
||||
|
||||
|
||||
2
Compiler/gtest/files/variants.macos10.14
Normal file
2
Compiler/gtest/files/variants.macos10.14
Normal file
@@ -0,0 +1,2 @@
|
||||
gtest/1.7.0 stable gcc/{5.4.0,5.5.0,6.4.0,7.3.0,7.4.0} b:cmake/3.10.3
|
||||
gtest/1.7.0 stable clang-macos/9.0.0 b:cmake/3.10.3
|
||||
@@ -1,5 +1,2 @@
|
||||
gtest/1.7.0 stable b:cmake b:gcc/5.4.0
|
||||
gtest/1.7.0 stable b:cmake b:gcc/5.5.0
|
||||
gtest/1.7.0 stable b:cmake b:gcc/6.4.0
|
||||
gtest/1.7.0 stable b:cmake b:gcc/7.3.0
|
||||
gtest/1.7.0 stable b:cmake b:clang-macos/9.0.0
|
||||
gtest/1.7.0 stable gcc/{5.4.0,6.4.0,7.3.0,7.4.0} b:cmake/3.10.3
|
||||
gtest/1.8.1 stable gcc/{5.5.0,6.4.0,7.4.0,8.3.0,9.2.0} b:cmake/3.10.3
|
||||
|
||||
Reference in New Issue
Block a user