Add benchmake target.
authorMathis Rosenhauer <rosenhauer@dkrz.de>
Tue, 15 Jul 2014 11:27:48 +0000 (13:27 +0200)
committerMathis Rosenhauer <rosenhauer@dkrz.de>
Tue, 15 Jul 2014 11:27:48 +0000 (13:27 +0200)
src/CMakeLists.txt
tests/CMakeLists.txt
tests/benc.sh

index 6378e08..b5a6391 100644 (file)
@@ -14,6 +14,7 @@ target_link_libraries(sz aec)
 add_executable(aec_client aec.c)
 set_target_properties(aec_client PROPERTIES OUTPUT_NAME "aec")
 target_link_libraries(aec_client aec)
+add_executable(utime EXCLUDE_FROM_ALL utime.c)
 
 install(FILES libaec.h szlib.h DESTINATION include)
 install(TARGETS aec sz
index d501ca7..2f7affc 100644 (file)
@@ -18,3 +18,9 @@ add_dependencies(check
   check_code_options
   check_buffer_sizes
   check_long_fs)
+
+add_custom_target(bench
+    COMMAND ${CMAKE_SOURCE_DIR}/tests/benc.sh
+    COMMAND ${CMAKE_SOURCE_DIR}/tests/bdec.sh
+    DEPENDS aec_client utime
+)
\ No newline at end of file
index a05bd78..69d3b10 100755 (executable)
@@ -2,7 +2,8 @@
 set -e
 AEC=../src/aec
 
-if [ ! -f  typical.rz ]; then
+if [ ! -f  typical.dat ]; then
+    rm -f typical.rz
     wget https://www.dkrz.de/redmine/attachments/download/442/typical.rz
     $AEC -d -n16 -j64 -r256 -m -c typical.rz > typical.dat
     rm -f bench.dat