Make valgrind optional for riscv64
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
This commit is contained in:
parent
06f659cddd
commit
2f4909b653
39
0008-Make-valgrind-optional-for-riscv64.patch
Normal file
39
0008-Make-valgrind-optional-for-riscv64.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 148f0dda18e556b90299e4f5a3da2c899fb2cac3 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 14 Feb 2024 19:17:57 +0000
|
||||
Subject: [PATCH 8/8] Make valgrind optional for riscv64
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 ++
|
||||
test/unittest/CMakeLists.txt | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ceda71b1..9d6a49a4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,6 +49,8 @@ if(CCACHE_FOUND)
|
||||
endif()
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
+find_program(VALGRIND_FOUND valgrind)
|
||||
+
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror")
|
||||
if (RAPIDJSON_BUILD_CXX11)
|
||||
diff --git a/test/unittest/CMakeLists.txt b/test/unittest/CMakeLists.txt
|
||||
index b3204d6c..aae901bc 100644
|
||||
--- a/test/unittest/CMakeLists.txt
|
||||
+++ b/test/unittest/CMakeLists.txt
|
||||
@@ -77,7 +77,7 @@ add_test(NAME unittest
|
||||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
|
||||
-if(NOT MSVC)
|
||||
+if(NOT MSVC AND VALGRIND_FOUND)
|
||||
# Not running SIMD.* unit test cases for Valgrind
|
||||
add_test(NAME valgrind_unittest
|
||||
COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.*
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -23,12 +23,17 @@ Patch: 0005-gate-definition-of-symmetric-equality-operators-on-i.patch
|
||||
Patch: 0006-do-not-define-operator-in-C-20.patch
|
||||
# Downstream-patch for gtest
|
||||
Patch: 0007-do-not-include-gtest_src_dir.patch
|
||||
# Make valgrind optional for riscv64
|
||||
# https://github.com/Tencent/rapidjson/pull/2263
|
||||
Patch: 0008-Make-valgrind-optional-for-riscv64.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gtest-devel
|
||||
%ifarch %{valgrind_arches}
|
||||
BuildRequires: valgrind
|
||||
%endif
|
||||
BuildRequires: doxygen
|
||||
|
||||
%description
|
||||
|
||||
Loading…
Reference in New Issue
Block a user