dev-cpp/properties-cpp: re-enable tests
Package-Manager: Portage-3.0.9, Repoman-3.0.2
This commit is contained in:
parent
8e81ddd815
commit
9605918951
17
dev-cpp/properties-cpp/files/FindGtest.cmake
Normal file
17
dev-cpp/properties-cpp/files/FindGtest.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(GTEST_INCLUDE_DIR gtest/gtest.h)
|
||||
find_path(GMOCK_INCLUDE_DIR gmock/gmock.h)
|
||||
|
||||
find_library(GMOCK_LIBRARY libgmock.so)
|
||||
find_library(GMOCK_MAIN_LIBRARY libgmock_main.so)
|
||||
find_library(GTEST_LIBRARY libgtest.so)
|
||||
find_library(GTEST_MAIN_LIBRARY libgtest_main.so)
|
||||
|
||||
set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY})
|
||||
set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
|
||||
set(GTEST_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
|
||||
|
||||
find_package_handle_standard_args(Gtest DEFAULT_MSG
|
||||
GMOCK_INCLUDE_DIR
|
||||
GTEST_INCLUDE_DIR)
|
@ -20,20 +20,25 @@ fi
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
IUSE="doc"
|
||||
IUSE="doc test"
|
||||
|
||||
DEPEND="
|
||||
doc? ( app-doc/doxygen )
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
# test? ( dev-cpp/gtest )
|
||||
#"
|
||||
|
||||
PATCHES=( "${FILESDIR}/optional_tests.patch" )
|
||||
|
||||
src_prepare() {
|
||||
# Provided FindGtest tries (and fails) to build its own version of gtest rather than actually search for it on the system
|
||||
cp "${FILESDIR}"/FindGtest.cmake cmake/FindGtest.cmake || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DPROPERTIES_CPP_ENABLE_DOC_GENERATION=$(usex doc)
|
||||
-DPROPERTIES_CPP_BUILD_TESTS=OFF
|
||||
-DPROPERTIES_CPP_BUILD_TESTS=$(usex test)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
@ -24,16 +24,18 @@ IUSE="doc"
|
||||
|
||||
DEPEND="
|
||||
doc? ( app-doc/doxygen )
|
||||
dev-cpp/gtest
|
||||
"
|
||||
# test? ( dev-cpp/gtest )
|
||||
#"
|
||||
|
||||
PATCHES=( "${FILESDIR}/optional_tests.patch" )
|
||||
src_prepare() {
|
||||
# Provided FindGtest tries (and fails) to build its own version of gtest rather than actually search for it on the system
|
||||
cp "${FILESDIR}"/FindGtest.cmake cmake/FindGtest.cmake || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DPROPERTIES_CPP_ENABLE_DOC_GENERATION=$(usex doc)
|
||||
-DPROPERTIES_CPP_BUILD_TESTS=OFF
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user