Skip to content

Commit 5efbdd7

Browse files
committed
build: Make Valgrind include directory a system one
This change prevents warnings emitted for the Valgrind code.
1 parent 3bab71c commit 5efbdd7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ if(SECP256K1_VALGRIND)
117117
find_package(Valgrind MODULE)
118118
if(Valgrind_FOUND)
119119
set(SECP256K1_VALGRIND ON)
120-
include_directories(${Valgrind_INCLUDE_DIR})
120+
include_directories(SYSTEM ${Valgrind_INCLUDE_DIR})
121121
add_definitions(-DVALGRIND)
122122
elseif(SECP256K1_VALGRIND STREQUAL "AUTO")
123123
set(SECP256K1_VALGRIND OFF)

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ case $host_os in
5757
# Homebrew where each one is located, then adjust paths accordingly.
5858
if $BREW list --versions valgrind >/dev/null; then
5959
valgrind_prefix=$($BREW --prefix valgrind 2>/dev/null)
60-
VALGRIND_CPPFLAGS="-I$valgrind_prefix/include"
60+
VALGRIND_CPPFLAGS="-nostdinc -isystem $valgrind_prefix/include"
6161
fi
6262
else
6363
AC_CHECK_PROG([PORT], port, port)

0 commit comments

Comments
 (0)