From 71c9abf694b2adb0791c1064b03d1eccbceaaaf9 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Thu, 8 Feb 2024 16:15:21 +0100 Subject: [PATCH] [CMake,DEB,RPM] Remove CppUnit code from build system Fixes: #2051 --- cmake/FindCppUnit.cmake | 30 ------------------------------ cmake/XRootDFindLibs.cmake | 4 +--- cmake/XRootDSummary.cmake | 2 +- debian/control | 1 - xrootd.spec | 6 ------ 5 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 cmake/FindCppUnit.cmake diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake deleted file mode 100644 index cc6e7400191..00000000000 --- a/cmake/FindCppUnit.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# Try to find CPPUnit -# Once done, this will define -# -# CPPUNIT_FOUND - system has cppunit -# CPPUNIT_INCLUDE_DIRS - the cppunit include directories -# CPPUNIT_LIBRARIES - cppunit libraries directories - -find_path( CPPUNIT_INCLUDE_DIRS cppunit/ui/text/TestRunner.h - HINTS - ${CPPUNIT_DIR} - $ENV{CPPUNIT_DIR} - /usr - /opt - PATH_SUFFIXES include -) - -find_library( CPPUNIT_LIBRARIES cppunit - HINTS - ${CPPUNIT_DIR} - $ENV{CPPUNIT_DIR} - /usr - /opt - PATH_SUFFIXES lib -) - -set(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR}) -set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CppUnit DEFAULT_MSG CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES) diff --git a/cmake/XRootDFindLibs.cmake b/cmake/XRootDFindLibs.cmake index 30775cca90f..435d07dbbbd 100644 --- a/cmake/XRootDFindLibs.cmake +++ b/cmake/XRootDFindLibs.cmake @@ -72,13 +72,11 @@ endif() if( ENABLE_TESTS ) if( FORCE_ENABLED ) - find_package( CppUnit REQUIRED ) find_package( GTest REQUIRED ) else() - find_package( CppUnit ) find_package( GTest ) endif() - if( CPPUNIT_FOUND AND GTEST_FOUND ) + if( GTEST_FOUND ) set( BUILD_TESTS TRUE ) else() set( BUILD_TESTS FALSE ) diff --git a/cmake/XRootDSummary.cmake b/cmake/XRootDSummary.cmake index c7bd4db2f37..881084282ce 100644 --- a/cmake/XRootDSummary.cmake +++ b/cmake/XRootDSummary.cmake @@ -10,7 +10,7 @@ component_status( MACAROONS BUILD_MACAROONS MACAROONS_FOUND AND JSON_FOUND AND component_status( PYTHON BUILD_PYTHON Python_Interpreter_FOUND AND Python_Development_FOUND ) component_status( READLINE ENABLE_READLINE READLINE_FOUND ) component_status( SCITOKENS BUILD_SCITOKENS SCITOKENSCPP_FOUND ) -component_status( TESTS BUILD_TESTS CPPUNIT_FOUND AND GTEST_FOUND ) +component_status( TESTS BUILD_TESTS GTEST_FOUND ) component_status( TPC BUILD_TPC CURL_FOUND ) component_status( VOMSXRD BUILD_VOMS VOMS_FOUND ) component_status( XRDCL ENABLE_XRDCL TRUE_VAR ) diff --git a/debian/control b/debian/control index f447fe51b9c..8eaf3f9371d 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,6 @@ Build-Depends: attr, cmake, libgtest-dev, - libcppunit-dev, libisal-dev, pkg-config, libfuse-dev [linux-any kfreebsd-any], diff --git a/xrootd.spec b/xrootd.spec index b07567e2707..0859febe4e6 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -47,11 +47,6 @@ Source1: %{url}/download/v%{compat_version}/%{name}-%{compat_version}.tar.gz %undefine __cmake3_in_source_build %endif -%if %{with tests} -# CppUnit crashes with LTO enabled -%global _lto_cflags %nil -%endif - %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 BuildRequires: %{devtoolset}-toolchain @@ -134,7 +129,6 @@ BuildRequires: openssl-devel %if %{with tests} BuildRequires: attr -BuildRequires: cppunit-devel BuildRequires: gtest-devel BuildRequires: openssl %endif