]> Creatis software - clitk.git/commitdiff
mechanism for hiding experimental stuff in vv
authorschaerer <schaerer>
Tue, 23 Mar 2010 16:30:59 +0000 (16:30 +0000)
committerschaerer <schaerer>
Tue, 23 Mar 2010 16:30:59 +0000 (16:30 +0000)
CMakeLists.txt
common/CMakeLists.txt
common/clitkCommon.h
fast_make.sh

index 2e121c6a8889ae8fae71e80328082705f5e2dd5c..e34db9b690a55e29719a55d79daed0a8ddf7dc72 100644 (file)
@@ -67,9 +67,10 @@ ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
 #=========================================================
 OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
 OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
+OPTION(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF)
 #=========================================================
 
-include_directories(itk filters)
+include_directories(itk filters ${PROJECT_BINARY_DIR})
 
 #=========================================================
 add_subdirectory(common)
index 93c9a01236bab4820c65eddd33fe68a25c06d1bc..e40a81fe673de3a40c4053b86f1d40947ea7b71c 100644 (file)
@@ -8,6 +8,8 @@ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake)
 #=========================================================
 # make clitk libraries*
 
+configure_file(clitkConfiguration.h.in ${PROJECT_BINARY_DIR}/clitkConfiguration.h)
+
 SET(clitkCommon_SRC
   clitkCommon.cxx 
   clitkListOfPair.cxx
index 3a12a001bad6d1c7ee80ed75cab83d40ebff0095..5820966474ac1c515cf3787d0ad09c2c9f23b636 100644 (file)
@@ -12,6 +12,8 @@
    -------------------------------------------------------------------*/
 
 // clitk include
+
+#include "clitkConfiguration.h"
 #include "clitkPortability.h"
 
 // itk include (include std)
index deb86d6719df9d4812595af215fddc0c89005d09..2007b0bec62a1dcae2a09ede2483f479a81f40f4 100755 (executable)
@@ -35,38 +35,38 @@ nice -n12 ionice -c3 make -j ${cpus} $@ &
 make_pid=$(jobs -p %nice)
 
 #watch memory use to avoid crashes
-while ps $make_pid >>/dev/null 
-do
-    if [ x"$(ps aux | grep cc1plus | grep -v grep | wc -l)" != x0 ]
-    then
-        ps ax -o vsize,comm | grep cc1plus | grep -o "\<[0-9]*\>" > mem_use
-        used_mem=$(awk 'BEGIN {sum=0;} {sum+=$1;} END {print sum;}' mem_use)
-        if (( "$used_mem"> ($available_mem - 300) ))
-        then
-            touch memory_exhausted_lock
-            echo "Stopping due to exagerated memory use ( $used_mem )"
-            handle_exit
-        elif (( "$used_mem"> ($available_mem/2) ))
-        then
-            if [ x$high_mem != xtrue ]
-            then
-                echo "Warning, high memory use, not spawning any more compilation jobs... ( $used_mem )"
-                killall -s SIGSTOP make
-                killall -s SIGCONT cc1plus
-                high_mem="true"
-                date_mem=$(date +%s)
-            fi
-            echo mem $used_mem / $available_mem
-        elif [ x$high_mem = xtrue ] && (( $(date +%s) > ( $date_mem + 5 ) ))
-        then
-            echo "Memory use back to normal"
-            high_mem=""
-            killall -s SIGCONT make
-        fi
-        rm mem_use
-    fi
-    sleep 1
-done
-rm memory_exhausted_lock 2>>/dev/null
+#while ps $make_pid >>/dev/null 
+#do
+#    if [ x"$(ps aux | grep cc1plus | grep -v grep | wc -l)" != x0 ]
+#    then
+#        ps ax -o vsize,comm | grep cc1plus | grep -o "\<[0-9]*\>" > mem_use
+#        used_mem=$(awk 'BEGIN {sum=0;} {sum+=$1;} END {print sum;}' mem_use)
+#        if (( "$used_mem"> ($available_mem - 300) ))
+#        then
+#            touch memory_exhausted_lock
+#            echo "Stopping due to exagerated memory use ( $used_mem )"
+#            handle_exit
+#        elif (( "$used_mem"> ($available_mem/2) ))
+#        then
+#            if [ x$high_mem != xtrue ]
+#            then
+#                echo "Warning, high memory use, not spawning any more compilation jobs... ( $used_mem )"
+#                killall -s SIGSTOP make
+#                killall -s SIGCONT cc1plus
+#                high_mem="true"
+#                date_mem=$(date +%s)
+#            fi
+#            echo mem $used_mem / $available_mem
+#        elif [ x$high_mem = xtrue ] && (( $(date +%s) > ( $date_mem + 5 ) ))
+#        then
+#            echo "Memory use back to normal"
+#            high_mem=""
+#            killall -s SIGCONT make
+#        fi
+#        rm mem_use
+#    fi
+#    sleep 1
+#done
+#rm memory_exhausted_lock 2>>/dev/null
 echo Done!
 echo