Skip to content

Commit

Permalink
Check if valgrind.h exists
Browse files Browse the repository at this point in the history
  • Loading branch information
czurnieden committed May 18, 2024
1 parent 19d6a93 commit f68379e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions demo/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
#include "s_mp_rand_jenkins.c"

/* TODO: Make it an environment variable via main.yml?
This is for testing only, so no to add checks to the build process. */
#include <valgrind/valgrind.h>
This is for testing only, so no reason to add checks to the build process. */
#ifdef __has_include
# if __has_include (<valgrind/valgrind.h>)
# include <valgrind/valgrind.h>
# endif
#else
# define RUNNING_ON_VALGRIND 1
#endif
#else
# define RUNNING_ON_VALGRIND 1
#endif

static long rand_long(void)
{
Expand Down

0 comments on commit f68379e

Please sign in to comment.