#=========================================================
INCLUDE(cmake/common.cmake)
#=========================================================
+#Support for the CTest dashboard testing system
+INCLUDE(CTest)
+#=========================================================
#=========================================================
# Find ITK (required)
IF(ITK_FOUND)
INCLUDE("${ITK_USE_FILE}")
ELSE(ITK_FOUND)
- MESSAGE(FATAL_ERROR
- "Cannot build without ITK. Please set ITK_DIR.")
+ MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
#=========================================================
ENDIF (CLITK_GENGETOPT STREQUAL "CLITK_GENGETOPT-NOTFOUND")
#=========================================================
+#=========================================================
+# Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
+FIND_LIBRARY(LIBSTATGRAB NAMES statgrab PATHS)
+IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+ MESSAGE("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
+ SET(CLITK_MEMORY_INFO OFF)
+ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+ SET(CLITK_MEMORY_INFO ON)
+ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+#=========================================================
+
#=========================================================
# Building in the source tree is forbidden
IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})