From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 10 Jun 2024 21:42:49 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sGkun-003rBn-1J for lore@lore.pengutronix.de; Mon, 10 Jun 2024 21:42:49 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sGkun-0007Uu-39; Mon, 10 Jun 2024 21:42:49 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sGktb-00065g-RM; Mon, 10 Jun 2024 21:41:35 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGktb-001NR3-AU; Mon, 10 Jun 2024 21:41:35 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sGktb-008uxt-0r; Mon, 10 Jun 2024 21:41:35 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Mon, 10 Jun 2024 21:41:35 +0200 Message-Id: <20240610194135.2125575-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529101855.623108-1-s.pueschel@pengutronix.de> References: <20240529101855.623108-1-s.pueschel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] apitrace: remove Google Test dependency X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: =?UTF-8?q?Sven=20P=C3=BCschel?= Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 0f5ebca4b7e48064f831be8290c3fdb0df47e51d. Michael [sent from post-receive hook] On Mon, 10 Jun 2024 21:41:35 +0200, Sven Püschel wrote: > The generated test files are neither executed nor installed into the > target. Therefore disabling them to remove the dependency on Google Test. > > Signed-off-by: Sven Püschel > Message-Id: <20240529101855.623108-1-s.pueschel@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch b/patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch > new file mode 100644 > index 000000000000..6141bc92fea6 > --- /dev/null > +++ b/patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch > @@ -0,0 +1,60 @@ > +From: Brent Spillner > +Date: Sat, 23 Sep 2023 00:07:25 +1000 > +Subject: [PATCH] Allow building without GTest when BUILD_TESTING is not set > + > +Link: https://github.com/apitrace/apitrace/pull/894 > +--- > + CMakeLists.txt | 19 ++++++++++++------- > + thirdparty/CMakeLists.txt | 2 +- > + 2 files changed, 13 insertions(+), 8 deletions(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index 3d8b5811ebe2..ecdf8a0f0b0b 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -483,7 +483,9 @@ if (NOT WIN32 AND NOT ENABLE_STATIC_EXE) > + pkg_check_modules (BROTLIENC IMPORTED_TARGET libbrotlienc>=1.0.7) > + endif () > + > +- find_package (GTest) > ++ if (BUILD_TESTING) > ++ find_package (GTest) > ++ endif () > + endif () > + > + add_subdirectory (thirdparty) > +@@ -495,12 +497,15 @@ add_subdirectory (thirdparty) > + include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khronos) > + > + # Convenience macro for adding unit tests > +-macro (add_gtest) > +- add_executable (${ARGV}) > +- target_link_libraries (${ARGV0} GTest::GTest) > +- add_dependencies (check ${ARGV0}) > +- add_test (NAME ${ARGV0} COMMAND ${ARGV0}) > +-endmacro () > ++# Should only be invoked when BUILD_TESTING is enabled > ++if (BUILD_TESTING) > ++ macro (add_gtest) > ++ add_executable (${ARGV}) > ++ target_link_libraries (${ARGV0} GTest::GTest) > ++ add_dependencies (check ${ARGV0}) > ++ add_test (NAME ${ARGV0} COMMAND ${ARGV0}) > ++ endmacro () > ++endif () > + > + > + ############################################################################## > +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt > +index ceb9305b44a4..4aca96c7e860 100644 > +--- a/thirdparty/CMakeLists.txt > ++++ b/thirdparty/CMakeLists.txt > +@@ -52,7 +52,7 @@ if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") > + endif () > + > + # We use non-standard C++ flags, so we can't just use GTest's CMakeLists.txt > +-if (NOT GTEST_FOUND) > ++if (BUILD_TESTING AND NOT GTEST_FOUND) > + message (STATUS "Using bundled GTest") > + include_with_scope (gtest.cmake) > + endif () > diff --git a/patches/apitrace-11.1/series b/patches/apitrace-11.1/series > index d4c24c91730e..3ec6151405e2 100644 > --- a/patches/apitrace-11.1/series > +++ b/patches/apitrace-11.1/series > @@ -2,4 +2,5 @@ > #tag:base --start-number 1 > 0001-HACK-don-t-check-for-submodules-for-external-depende.patch > 0002-HACK-don-t-do-dpkg-architecture-magic.patch > -# d781b7ce7b411ab6ab663c32f56ed491 - git-ptx-patches magic > +0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch > +# b2c22b5a761a53785691516d94cb19c1 - git-ptx-patches magic > diff --git a/rules/apitrace.in b/rules/apitrace.in > index 581517a174f7..5a8b3e596828 100644 > --- a/rules/apitrace.in > +++ b/rules/apitrace.in > @@ -7,7 +7,6 @@ config APITRACE > select ZLIB > select LIBPNG > select BROTLI > - select GOOGLETEST > prompt "apitrace" > help > Tools for tracing OpenGL, Direct3D, and other graphics APIs. > diff --git a/rules/apitrace.make b/rules/apitrace.make > index 197413fbb73d..6be996408be9 100644 > --- a/rules/apitrace.make > +++ b/rules/apitrace.make > @@ -55,7 +55,7 @@ APITRACE_CONF_TOOL := cmake > APITRACE_CONF_OPT := \ > $(CROSS_CMAKE_USR) \ > -DWRAPPER_INSTALL_DIR=/usr/lib/apitrace/wrappers \ > - -DBUILD_TESTING=ON \ > + -DBUILD_TESTING=OFF \ > -DENABLE_ASAN=OFF \ > -DENABLE_CLI=ON \ > -DENABLE_EGL=ON \