From 9553e9c6ccc78a65b4dfb5d9b661ff4da05ce2c4 Mon Sep 17 00:00:00 2001 From: srit Date: Mon, 21 Mar 2011 15:27:18 +0000 Subject: [PATCH] Removed cmake memory option --- CMakeLists.txt | 12 +++++++++--- common/CMakeLists.txt | 12 +++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e56357..563db00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,7 @@ FIND_PACKAGE(ITK) 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) #========================================================= @@ -44,6 +43,14 @@ IF (CLITK_GENGETOPT STREQUAL "CLITK_GENGETOPT-NOTFOUND") ENDIF (CLITK_GENGETOPT STREQUAL "CLITK_GENGETOPT-NOTFOUND") #========================================================= +#========================================================= +# Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library +FIND_PROGRAM(LIBSTATGRAB NAMES statgrab PATHS) +IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") + MESSAGE("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information") +ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") +#========================================================= + #========================================================= # Building in the source tree is forbidden IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR}) @@ -73,7 +80,6 @@ OPTION(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF) OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF) OPTION(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF) OPTION(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF) -OPTION(CLITK_MEMORY_INFO "Enable memory information" OFF) OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON) IF (CLITK_BUILD_VV) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 2060486..0a5dbfe 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -37,15 +37,9 @@ SET(clitkCommon_SRC ### Declare clitkCommon library ADD_LIBRARY(clitkCommon STATIC ${clitkCommon_SRC}) -### if LIBSTATGRAB is installed, add clitkMemoryUsage.cxx in the library -IF(CLITK_MEMORY_INFO) - FIND_PROGRAM(LIBSTATGRAB NAMES statgrab PATHS) - IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") - MESSAGE( FATAL_ERROR "libstatgrab NOT FOUND -> please install http://www.i-scream.org/libstatgrab/") - ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") - TARGET_LINK_LIBRARIES(clitkCommon statgrab) - ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") -ENDIF(CLITK_MEMORY_INFO) +IF(NOT ${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") + TARGET_LINK_LIBRARIES(clitkCommon statgrab) +ENDIF(NOT ${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND") TARGET_LINK_LIBRARIES(clitkCommon vtkCommon vtkImaging vtkHybrid ITKBasicFilters) -- 2.47.1