Skip to content

Commit

Permalink
Added valgrind support
Browse files Browse the repository at this point in the history
  • Loading branch information
karypis committed Jan 30, 2022
1 parent 34c0359 commit 94c03a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ assert = not-set
assert2 = not-set
debug = not-set
gprof = not-set
valgrind = not-set
openmp = not-set
shared = not-set
cc = not-set
Expand All @@ -29,11 +30,9 @@ ifneq ($(prefix), not-set)
CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
endif
ifneq ($(i64), not-set)
CONFIG_FLAGS += -DIDX64=$(i64)
IDXWIDTH = "\#define IDXTYPEWIDTH 64"
endif
ifneq ($(r64), not-set)
CONFIG_FLAGS += -DREAL64=$(r64)
REALWIDTH = "\#define REALTYPEWIDTH 64"
endif
ifneq ($(gdb), not-set)
Expand All @@ -51,6 +50,9 @@ endif
ifneq ($(gprof), not-set)
CONFIG_FLAGS += -DGPROF=$(gprof)
endif
ifneq ($(valgrind), not-set)
CONFIG_FLAGS += -DVALGRIND=$(valgrind)
endif
ifneq ($(openmp), not-set)
CONFIG_FLAGS += -DOPENMP=$(openmp)
endif
Expand Down
6 changes: 5 additions & 1 deletion conf/gkbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ option(ASSERT "turn asserts on" OFF)
option(ASSERT2 "additional assertions" OFF)
option(DEBUG "add debugging support" OFF)
option(GPROF "add gprof support" OFF)
option(VALGRIND "add valgrind support" OFF)
option(OPENMP "enable OpenMP support" OFF)
option(PCRE "enable PCRE support" OFF)
option(GKREGEX "enable GKREGEX support" OFF)
Expand All @@ -28,8 +29,11 @@ endif(CYGWIN)
if(CMAKE_COMPILER_IS_GNUCC)
# GCC opts.
set(GK_COPTIONS "${GK_COPTIONS} -std=c99 -fno-strict-aliasing")
if(VALGRIND)
set(GK_COPTIONS "${GK_COPTIONS} -march=x86-64 -mtune=generic")
else()
set(GK_COPTIONS "${GK_COPTIONS} -march=native")
# set(GK_COPTIONS "${GK_COPTIONS} -march=x86-64 -mtune=generic")
endif(VALGRIND)
if(NOT MINGW)
set(GK_COPTIONS "${GK_COPTIONS} -fPIC")
endif(NOT MINGW)
Expand Down

0 comments on commit 94c03a6

Please sign in to comment.