[opengm] 353/386: disable mem-logging by default, because it might not work on all systems
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:38:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository opengm.
commit d73b402bb4db96c51af8908516e364af8f45d29e
Author: Joerg Kappes <kappes at math.uni-heidelberg.de>
Date: Fri Apr 1 22:04:09 2016 +0200
disable mem-logging by default, because it might not work on all systems
---
CMakeLists.txt | 8 ++++++++
include/opengm/utilities/meminfo.hxx | 2 +-
src/unittest/CMakeLists.txt | 6 ++++--
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92e894c..eb57029 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,7 +94,15 @@ OPTION(BUILD_PYTHON_WRAPPER "Build python wrapper" OFF)
OPTION(BUILD_MATLAB_WRAPPER "Build matlab wrapper" OFF)
###Grante needs C++11. Since we have not tested OpenGM under this standard yet, using Grante is realy experimental!!!
###OPTION(WITH_GRANTE "Include wrapper for grante" OFF)
+OPTION(WITH_MEMINFO "Use memory logging in visitor" OFF)
+
+#--------------------------------------------------------------
+# MEMINFO
+#--------------------------------------------------------------
+if(WITH_MEMINFO)
+ add_definition(-DSYS_MEMORYINFO_ON)
+endif()
#--------------------------------------------------------------
# Cplex
#--------------------------------------------------------------
diff --git a/include/opengm/utilities/meminfo.hxx b/include/opengm/utilities/meminfo.hxx
index ce44776..ebe509a 100644
--- a/include/opengm/utilities/meminfo.hxx
+++ b/include/opengm/utilities/meminfo.hxx
@@ -27,7 +27,7 @@
#include "string.h"
// uncomment this line if U have problems with memorylogging -> this will disable it.
-#define SYS_MEMORYINFO_ON
+//#define SYS_MEMORYINFO_ON
#if ( defined(__APPLE__) && defined(SYS_MEMORYINFO_ON) )
# define SYS_MEMORYINFO_MAC
diff --git a/src/unittest/CMakeLists.txt b/src/unittest/CMakeLists.txt
index 8110b7a..d99f00a 100644
--- a/src/unittest/CMakeLists.txt
+++ b/src/unittest/CMakeLists.txt
@@ -79,8 +79,10 @@ if(BUILD_TESTING)
add_test(test-io-hdf5 ${CMAKE_CURRENT_BINARY_DIR}/test-io-hdf5)
endif()
- ADD_EXECUTABLE(test-memoryinfo test_memoryinfo.cxx ${headers})
- add_test(test-memoryinfo ${CMAKE_CURRENT_BINARY_DIR}/test-memoryinfo)
+ if(WITH_MEMINFO)
+ ADD_EXECUTABLE(test-memoryinfo test_memoryinfo.cxx ${headers})
+ add_test(test-memoryinfo ${CMAKE_CURRENT_BINARY_DIR}/test-memoryinfo)
+ endif()
add_executable(test-lp-solver test_lp_solver.cxx ${headers})
add_test(test-lp-solver ${CMAKE_CURRENT_BINARY_DIR}/test-lp-solver)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git
More information about the debian-science-commits
mailing list