You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(45) |
Dec
(80) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(58) |
Feb
(127) |
Mar
(74) |
Apr
(34) |
May
(117) |
Jun
(14) |
Jul
(26) |
Aug
(13) |
Sep
(1) |
Oct
(38) |
Nov
(13) |
Dec
(5) |
| 2005 |
Jan
(108) |
Feb
(134) |
Mar
(54) |
Apr
(133) |
May
(16) |
Jun
(54) |
Jul
(128) |
Aug
(99) |
Sep
(157) |
Oct
(182) |
Nov
(236) |
Dec
(212) |
| 2006 |
Jan
(86) |
Feb
(76) |
Mar
(121) |
Apr
(27) |
May
(7) |
Jun
(1) |
Jul
(6) |
Aug
(28) |
Sep
(1) |
Oct
(27) |
Nov
(5) |
Dec
|
| 2007 |
Jan
(32) |
Feb
(22) |
Mar
(22) |
Apr
(11) |
May
(3) |
Jun
(12) |
Jul
(11) |
Aug
(9) |
Sep
(37) |
Oct
(4) |
Nov
(9) |
Dec
(51) |
| 2008 |
Jan
(7) |
Feb
(31) |
Mar
(46) |
Apr
(31) |
May
(5) |
Jun
(27) |
Jul
(12) |
Aug
(5) |
Sep
(13) |
Oct
(24) |
Nov
(112) |
Dec
(15) |
| 2009 |
Jan
(6) |
Feb
(103) |
Mar
(66) |
Apr
(9) |
May
(8) |
Jun
(1) |
Jul
(20) |
Aug
(9) |
Sep
(2) |
Oct
(81) |
Nov
(88) |
Dec
(30) |
| 2010 |
Jan
(65) |
Feb
(57) |
Mar
(22) |
Apr
(12) |
May
(4) |
Jun
(12) |
Jul
(43) |
Aug
(6) |
Sep
(6) |
Oct
(4) |
Nov
(6) |
Dec
(3) |
| 2011 |
Jan
(10) |
Feb
(27) |
Mar
(11) |
Apr
(9) |
May
(69) |
Jun
(73) |
Jul
(67) |
Aug
(116) |
Sep
(40) |
Oct
(11) |
Nov
(34) |
Dec
(19) |
| 2012 |
Jan
|
Feb
(4) |
Mar
(28) |
Apr
(18) |
May
(9) |
Jun
(7) |
Jul
(4) |
Aug
(155) |
Sep
(264) |
Oct
(172) |
Nov
(15) |
Dec
(40) |
| 2013 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(20) |
Jul
(76) |
Aug
(67) |
Sep
(49) |
Oct
(27) |
Nov
(3) |
Dec
(3) |
| 2014 |
Jan
(7) |
Feb
(7) |
Mar
(16) |
Apr
|
May
(4) |
Jun
(1) |
Jul
(18) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
(6) |
Feb
(5) |
Mar
(3) |
Apr
(23) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
(2) |
Dec
(4) |
| 2016 |
Jan
(2) |
Feb
(7) |
Mar
(2) |
Apr
(1) |
May
(14) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
| 2017 |
Jan
(6) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(6) |
Oct
|
Nov
(3) |
Dec
|
| 2018 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2019 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(8) |
Oct
|
Nov
(2) |
Dec
(25) |
| 2020 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(53) |
Nov
(33) |
Dec
|
| 2021 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(5) |
| 2022 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(93) |
Aug
(206) |
Sep
(39) |
Oct
(19) |
Nov
(11) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(150) |
Jul
(124) |
Aug
(14) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(62) |
Aug
|
Sep
(7) |
Oct
|
Nov
(7) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
(14) |
May
(3) |
Jun
|
Jul
|
Aug
(76) |
Sep
(214) |
Oct
(6) |
Nov
|
Dec
|
|
From: <kin...@us...> - 2025-09-10 01:08:45
|
Revision: 7386
http://sourceforge.net/p/teem/code/7386
Author: kindlmann
Date: 2025-09-10 01:08:19 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
still in progress
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:52:48 UTC (rev 7385)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 01:08:19 UTC (rev 7386)
@@ -73,6 +73,7 @@
cmake_minimum_required(VERSION 3.13)
project(CheckLibM_${suffix} C)
+set(CMAKE_VERBOSE_MAKEFILE OFF)
add_library(tiny SHARED \"${_checklibm_dir}/tiny.c\")
add_executable(maintiny \"${_checklibm_dir}/maintiny.c\")
target_link_libraries(maintiny PRIVATE tiny ${extra_libs})
@@ -79,7 +80,10 @@
")
# Compile the project
- try_compile(_ok "${_proj_dir}/build" "${_proj_dir}" CheckLibM_${suffix}
+ try_compile(_ok
+ "${_proj_dir}/build"
+ "${_proj_dir}"
+ CheckLibM_${suffix}
OUTPUT_VARIABLE _out)
if(NOT _ok)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 00:52:53
|
Revision: 7385
http://sourceforge.net/p/teem/code/7385
Author: kindlmann
Date: 2025-09-10 00:52:48 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
still in progress
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:51:14 UTC (rev 7384)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:52:48 UTC (rev 7385)
@@ -140,5 +140,5 @@
endif()
### ------------------------------------------------------------------------
-# Cleanup
+# Cleanup if we didn't crash out
file(REMOVE_RECURSE "${_checklibm_dir}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 00:51:20
|
Revision: 7384
http://sourceforge.net/p/teem/code/7384
Author: kindlmann
Date: 2025-09-10 00:51:14 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
still in progress
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:31:24 UTC (rev 7383)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:51:14 UTC (rev 7384)
@@ -49,8 +49,8 @@
#include <stdio.h>
#include <math.h>
int tinyFunc(double val) {
- int ret = (6 != (int)(log1pf(tanf(val)))); // should be 7 not 6
- printf(\"tinyFunc: returning %d (%s)\n\", ret, ret ? \"bad\" : \"good\");
+ int ret = (7 != (int)(log1pf(tanf(val))));
+ printf(\"tinyFunc: returning %d (%s)\\n\", ret, ret ? \"bad\" : \"good\");
return ret;
}
")
@@ -63,54 +63,54 @@
}
")
-# big helper macro to build & run test project
-macro(_checklibm_try_build_and_run _suffix _extra_libs _result_var)
- set(_proj_dir "${_checklibm_dir}/${_suffix}")
+# Function that compiles and runs `maintiny` test
+function(_checklibm_try_build_and_run suffix extra_libs result_var)
+ # Local variables inside function
+ set(_proj_dir "${_checklibm_dir}/${suffix}")
file(MAKE_DIRECTORY "${_proj_dir}")
- # write a minimal CMake project
file(WRITE "${_proj_dir}/CMakeLists.txt" "
cmake_minimum_required(VERSION 3.13)
-project(CheckLibM_${_suffix} C)
+project(CheckLibM_${suffix} C)
add_library(tiny SHARED \"${_checklibm_dir}/tiny.c\")
add_executable(maintiny \"${_checklibm_dir}/maintiny.c\")
-target_link_libraries(maintiny PRIVATE tiny ${_extra_libs})
+target_link_libraries(maintiny PRIVATE tiny ${extra_libs})
")
- try_compile(_${_suffix}_ok
- "${_proj_dir}/build"
- "${_proj_dir}"
- CheckLibM_${_suffix}
- OUTPUT_VARIABLE _${_suffix}_out
- )
+ # Compile the project
+ try_compile(_ok "${_proj_dir}/build" "${_proj_dir}" CheckLibM_${suffix}
+ OUTPUT_VARIABLE _out)
- if(_${_suffix}_ok)
+ if(NOT _ok)
+ message(STATUS "CheckLibM: ${suffix} compilation failed:\n${_out}")
+ set(${result_var} FALSE PARENT_SCOPE)
+ else()
# Run the resulting binary to check runtime
set(_bin "${_proj_dir}/build/maintiny${CMAKE_EXECUTABLE_SUFFIX}")
- if(EXISTS "${_bin}")
- execute_process(
- COMMAND "${_bin}"
- RESULT_VARIABLE _${_suffix}_runres
- OUTPUT_VARIABLE _${_suffix}_runout
- ERROR_VARIABLE _${_suffix}_runerr
- )
- if(_${_suffix}_runres EQUAL 0)
- set(${_result_var} TRUE)
+ if(NOT EXISTS "${_bin}")
+ message(FATAL_ERROR "CheckLibM: maintiny executable missing for ${suffix} test")
+ set(${result_var} FALSE PARENT_SCOPE)
+ else()
+ # Run the binary
+ execute_process(COMMAND "${_bin}"
+ RESULT_VARIABLE _runres
+ OUTPUT_VARIABLE _runout
+ ERROR_VARIABLE _runerr)
+ if(_runres EQUAL 0)
+ # 0 is unix for "all good"; what we want
+ set(${result_var} TRUE PARENT_SCOPE)
else()
message(FATAL_ERROR
"CheckLibM: maintiny built in ${_suffix} mode but failed at runtime.\n"
- "Exit code: ${_${_suffix}_runres}\n"
- "Stdout: ${_${_suffix}_runout}\n"
- "Stderr: ${_${_suffix}_runerr}")
+ "Exit code: ${_runres}\n"
+ "Stdout: ${_runout}\n"
+ "Stderr: ${_runerr}")
+ set(${result_var} FALSE PARENT_SCOPE)
endif()
- else()
- message(FATAL_ERROR "CheckLibM: maintiny executable missing in ${_suffix} test")
endif()
- else()
- set(${_result_var} FALSE)
endif()
-endmacro()
+endfunction()
### ------------------------------------------------------------------------
# Now run the test.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 00:31:27
|
Revision: 7383
http://sourceforge.net/p/teem/code/7383
Author: kindlmann
Date: 2025-09-10 00:31:24 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
still in progress
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:24:03 UTC (rev 7382)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:31:24 UTC (rev 7383)
@@ -46,9 +46,12 @@
# T=log1pf(tanf(1.5703125)) ~= 7.634267208876022, so RT=(int)T should be 7
# If 7 == RT, our exit status should be unix for "all good", i.e. 0 ==> return 7 != T
file(WRITE "${_checklibm_dir}/tiny.c" "
+#include <stdio.h>
#include <math.h>
int tinyFunc(double val) {
- return (6 != (int)(log1pf(tanf(val)))); // should be 7 not 6
+ int ret = (6 != (int)(log1pf(tanf(val)))); // should be 7 not 6
+ printf(\"tinyFunc: returning %d (%s)\n\", ret, ret ? \"bad\" : \"good\");
+ return ret;
}
")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 00:24:04
|
Revision: 7382
http://sourceforge.net/p/teem/code/7382
Author: kindlmann
Date: 2025-09-10 00:24:03 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
tweaks, still in progress
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:11:36 UTC (rev 7381)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:24:03 UTC (rev 7382)
@@ -4,7 +4,7 @@
### Rationale
# Different unices have different ways of tacitly linking (or not) with -lm.
-# In the interests of pedantic explicitness, we figure out if, linking with -lm
+# In the interests of pedantic explicitness, we figure out if linking with -lm
# is needed when linking with a library that calls math functions. Yes,
# https://cmake.org/cmake/help/latest/module/CheckLibraryExists.html could
# probably do the job here, but once I (GLK) went down the rabbit hole of
@@ -48,7 +48,7 @@
file(WRITE "${_checklibm_dir}/tiny.c" "
#include <math.h>
int tinyFunc(double val) {
- return (7 != (int)(log1pf(tanf(val))));
+ return (6 != (int)(log1pf(tanf(val)))); // should be 7 not 6
}
")
@@ -93,7 +93,7 @@
ERROR_VARIABLE _${_suffix}_runerr
)
if(_${_suffix}_runres EQUAL 0)
- set(${_result_var} TRUE PARENT_SCOPE)
+ set(${_result_var} TRUE)
else()
message(FATAL_ERROR
"CheckLibM: maintiny built in ${_suffix} mode but failed at runtime.\n"
@@ -105,7 +105,7 @@
message(FATAL_ERROR "CheckLibM: maintiny executable missing in ${_suffix} test")
endif()
else()
- set(${_result_var} FALSE PARENT_SCOPE)
+ set(${_result_var} FALSE)
endif()
endmacro()
@@ -126,9 +126,9 @@
if(_checklibm_with_libm_ok)
# Yes, it does work with -lm.
set(LIBM_NEEDED TRUE CACHE BOOL "${_lmn_desc}")
- message(STATUS "CheckLibM: math requires explicit -lm")
+ message(STATUS "CheckLibM: yes, math requires explicit -lm")
else()
- # Yikes, it failed without and with -lm. Bye.
+ # Yikes, it failed both without and with -lm. Bye.
message(FATAL_ERROR
"CheckLibM: math test failed even with -lm. Output:\n"
"${_checklibm_no_libm_out}\n"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 00:11:39
|
Revision: 7381
http://sourceforge.net/p/teem/code/7381
Author: kindlmann
Date: 2025-09-10 00:11:36 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
using new CheckLibM, but still in progress
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-10 00:09:09 UTC (rev 7380)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-10 00:11:36 UTC (rev 7381)
@@ -19,7 +19,7 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# Teem/CMakeLists.txt Version 10.94
+# Teem/CMakeLists.txt Version 10.95
# This CMakeLists.txt describes a Teem package that contains:
# (1) a library ("libteem" on unix) and
@@ -78,7 +78,7 @@
include(CMakeParseArguments) # for cmake_parse_arguments
include(CMakePrintHelpers) # for debugging via cmake_print_variables(varname)
-# CMake modules path (for e.g. FindLEVMAR.cmake)
+# CMake modules path (for e.g. CheckLibM.cmake)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
###-------------------------------------------------------------------------------------
@@ -375,9 +375,13 @@
# (used as part of handling Windows "extern" analog)
target_compile_definitions(Teem PUBLIC "$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:TEEM_STATIC>")
-# brute-force: add -lm to link line for any and all Unices:
-if(UNIX)
+# Do we need to link with -lm?
+include(CheckLibM)
+if(LIBM_NEEDED)
+ message(STATUS "Will explicitly link with -lm")
target_link_libraries(Teem PRIVATE m)
+else()
+ message(STATUS "Do not need to link with -lm")
endif()
# Set remaining target properties
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 00:09:14
|
Revision: 7380
http://sourceforge.net/p/teem/code/7380
Author: kindlmann
Date: 2025-09-10 00:09:09 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
overblown test for needing -lm linking
Added Paths:
-----------
teem/trunk/CMake/CheckLibM.cmake
Added: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake (rev 0)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:09:09 UTC (rev 7380)
@@ -0,0 +1,141 @@
+# CMake/CheckLibM.cmake: learn if need to link with -lm for math functions
+# Copyright (C) 2025 University of Chicago
+# See ../LICENSE.txt for licensing terms
+
+### Rationale
+# Different unices have different ways of tacitly linking (or not) with -lm.
+# In the interests of pedantic explicitness, we figure out if, linking with -lm
+# is needed when linking with a library that calls math functions. Yes,
+# https://cmake.org/cmake/help/latest/module/CheckLibraryExists.html could
+# probably do the job here, but once I (GLK) went down the rabbit hole of
+# understanding what the problem was, I wanted to create a CMake module that
+# replicated the minimal example I used. So, this test builds a shared library
+# `libtiny` that calls some math functions, then an executable `maintiny` that
+# calls into that library. When compiling `maintiny`, we try linking:
+# 1. Without -lm
+# 2. With -lm (if needed)
+# Then we run `maintiny` to ensure the math is mathing.
+#
+# Defines:
+# LIBM_NEEDED -- TRUE if executables must link with -lm
+#
+# Usage example
+# include(CheckLibM)
+# if(LIBM_NEEDED)
+# target_link_libraries(Teem PRIVATE m)
+# endif()
+#
+
+### ------------------------------------------------------------------------
+# Setup
+if(DEFINED LIBM_NEEDED)
+ # not our first rodeo
+ return()
+endif()
+
+set(_lmn_desc "Does the platform require linking with -lm?")
+message(STATUS "CheckLibM: ${_lmn_desc}")
+
+set(_checklibm_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/tmpCheckLibM")
+file(MAKE_DIRECTORY "${_checklibm_dir}")
+
+# write `tiny.c`: single source file for libtiny, using some functions that very
+# likely do *not* exist outside the standard math library: tanf and log1pf.
+# Will evaluate with val=1.5703125, but not at compile time or else optimizer
+# will happily pre-compute the result, thus undermining this test.
+# T=log1pf(tanf(1.5703125)) ~= 7.634267208876022, so RT=(int)T should be 7
+# If 7 == RT, our exit status should be unix for "all good", i.e. 0 ==> return 7 != T
+file(WRITE "${_checklibm_dir}/tiny.c" "
+#include <math.h>
+int tinyFunc(double val) {
+ return (7 != (int)(log1pf(tanf(val))));
+}
+")
+
+# write `maintiny.c`: single source for main() that calls into libtiny
+file(WRITE "${_checklibm_dir}/maintiny.c" "
+extern int tinyFunc(double val);
+int main(void) {
+ return tinyFunc(1.5703125f);
+}
+")
+
+# big helper macro to build & run test project
+macro(_checklibm_try_build_and_run _suffix _extra_libs _result_var)
+ set(_proj_dir "${_checklibm_dir}/${_suffix}")
+ file(MAKE_DIRECTORY "${_proj_dir}")
+
+ # write a minimal CMake project
+ file(WRITE "${_proj_dir}/CMakeLists.txt" "
+cmake_minimum_required(VERSION 3.13)
+project(CheckLibM_${_suffix} C)
+
+add_library(tiny SHARED \"${_checklibm_dir}/tiny.c\")
+add_executable(maintiny \"${_checklibm_dir}/maintiny.c\")
+target_link_libraries(maintiny PRIVATE tiny ${_extra_libs})
+ ")
+
+ try_compile(_${_suffix}_ok
+ "${_proj_dir}/build"
+ "${_proj_dir}"
+ CheckLibM_${_suffix}
+ OUTPUT_VARIABLE _${_suffix}_out
+ )
+
+ if(_${_suffix}_ok)
+ # Run the resulting binary to check runtime
+ set(_bin "${_proj_dir}/build/maintiny${CMAKE_EXECUTABLE_SUFFIX}")
+ if(EXISTS "${_bin}")
+ execute_process(
+ COMMAND "${_bin}"
+ RESULT_VARIABLE _${_suffix}_runres
+ OUTPUT_VARIABLE _${_suffix}_runout
+ ERROR_VARIABLE _${_suffix}_runerr
+ )
+ if(_${_suffix}_runres EQUAL 0)
+ set(${_result_var} TRUE PARENT_SCOPE)
+ else()
+ message(FATAL_ERROR
+ "CheckLibM: maintiny built in ${_suffix} mode but failed at runtime.\n"
+ "Exit code: ${_${_suffix}_runres}\n"
+ "Stdout: ${_${_suffix}_runout}\n"
+ "Stderr: ${_${_suffix}_runerr}")
+ endif()
+ else()
+ message(FATAL_ERROR "CheckLibM: maintiny executable missing in ${_suffix} test")
+ endif()
+ else()
+ set(${_result_var} FALSE PARENT_SCOPE)
+ endif()
+endmacro()
+
+### ------------------------------------------------------------------------
+# Now run the test.
+# First try compiling + running without `-lm` ...
+_checklibm_try_build_and_run(no_libm "" _checklibm_no_libm_ok)
+
+if(_checklibm_no_libm_ok)
+ # ... and either it did work without `-lm`, or ...
+ set(LIBM_NEEDED FALSE CACHE BOOL ${_lmn_desc})
+ message(STATUS "CheckLibM: math works without -lm")
+else()
+ # ... it did not work without -lm.
+ # Does it does work *with* -lm?
+ _checklibm_try_build_and_run(with_libm "m" _checklibm_with_libm_ok)
+
+ if(_checklibm_with_libm_ok)
+ # Yes, it does work with -lm.
+ set(LIBM_NEEDED TRUE CACHE BOOL "${_lmn_desc}")
+ message(STATUS "CheckLibM: math requires explicit -lm")
+ else()
+ # Yikes, it failed without and with -lm. Bye.
+ message(FATAL_ERROR
+ "CheckLibM: math test failed even with -lm. Output:\n"
+ "${_checklibm_no_libm_out}\n"
+ "${_checklibm_with_libm_out}")
+ endif()
+endif()
+
+### ------------------------------------------------------------------------
+# Cleanup
+file(REMOVE_RECURSE "${_checklibm_dir}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 17:18:20
|
Revision: 7379
http://sourceforge.net/p/teem/code/7379
Author: kindlmann
Date: 2025-09-09 17:18:16 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
still debugging this on linux
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-09 15:49:37 UTC (rev 7378)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-09 17:18:16 UTC (rev 7379)
@@ -375,45 +375,10 @@
# (used as part of handling Windows "extern" analog)
target_compile_definitions(Teem PUBLIC "$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:TEEM_STATIC>")
-# # # - - - - - - - - - - - Handling linking with math library libm via -lm
-# We could be brute-force, and add -lm to link line for any and all Unices:
-# if(UNIX)
-# target_link_libraries(Teem PRIVATE m)
-# endif()
-# But not all Unices actually need to link with -lm to access math functions
-# like sin() and exp(); let's figure out if we need it.
-
-# https://cmake.org/cmake/help/latest/module/CheckSourceCompiles.html
-include(CheckSourceCompiles)
-
-# Tiny test program that calls sin()
-set(_Teem_libm_test_source "
- #include <math.h>
- int main(void) { return (int)sin(0.0); }
-")
-
-# Always start with a clean slate
-unset(CMAKE_REQUIRED_LIBRARIES)
-
-# First try compiling without -lm
-check_source_compiles(C "${_Teem_libm_test_source}" HAVE_SIN_WITHOUT_LIBM)
-
-if(HAVE_SIN_WITHOUT_LIBM)
- message(STATUS "sin() found without libm; do NOT need to link with -lm")
-else()
- # Retry compiling with -lm
- set(CMAKE_REQUIRED_LIBRARIES m)
- check_source_compiles(C "${_Teem_libm_test_source}" HAVE_SIN_WITH_LIBM)
- unset(CMAKE_REQUIRED_LIBRARIES)
-
- if(HAVE_SIN_WITH_LIBM)
- message(STATUS "sin() requires libm; DO need to link with -lm")
- target_link_libraries(Teem PRIVATE m)
- else()
- message(FATAL_ERROR "Could not find sin() at all!")
- endif()
+# brute-force: add -lm to link line for any and all Unices:
+if(UNIX)
+ target_link_libraries(Teem PRIVATE m)
endif()
-# # # - - - - - - - - - - - end of handling -lm
# Set remaining target properties
set_target_properties(Teem PROPERTIES
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 15:49:40
|
Revision: 7378
http://sourceforge.net/p/teem/code/7378
Author: kindlmann
Date: 2025-09-09 15:49:37 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
place holder for next version of this
Added Paths:
-----------
teem/trunk/CMake/FindLEVMAR-v2.cmake
Added: teem/trunk/CMake/FindLEVMAR-v2.cmake
===================================================================
--- teem/trunk/CMake/FindLEVMAR-v2.cmake (rev 0)
+++ teem/trunk/CMake/FindLEVMAR-v2.cmake 2025-09-09 15:49:37 UTC (rev 7378)
@@ -0,0 +1,24 @@
+# (from cif) suggested usage
+#list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
+#find_package(LEVMAR REQUIRED)
+#
+#if(LEVMAR_FOUND)
+# include_directories(${LEVMAR_INCLUDE_DIRS})
+# target_link_libraries(your_target ${LEVMAR_LIBRARIES})
+#endif()
+
+find_path(LEVMAR_INCLUDE_DIR levmar.h
+ PATH_SUFFIXES levmar
+)
+
+find_library(LEVMAR_LIBRARY NAMES levmar
+ PATH_SUFFIXES lib
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LEVMAR DEFAULT_MSG LEVMAR_LIBRARY LEVMAR_INCLUDE_DIR)
+
+if(LEVMAR_FOUND)
+ set(LEVMAR_LIBRARIES ${LEVMAR_LIBRARY})
+ set(LEVMAR_INCLUDE_DIRS ${LEVMAR_INCLUDE_DIR})
+endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 15:18:10
|
Revision: 7377
http://sourceforge.net/p/teem/code/7377
Author: kindlmann
Date: 2025-09-09 15:18:04 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
API CHANGE: fixing something (for TeemV2) that has long needed fixing: NrrdKernel->numParm now renamed parmNum to be consistent with naming conventions elsewhere in Teem
Modified Paths:
--------------
teem/trunk/src/TODO.txt
teem/trunk/src/bin/qbert.c
teem/trunk/src/gage/ctx.c
teem/trunk/src/meet/meetNrrd.c
teem/trunk/src/nrrd/kernel.c
teem/trunk/src/nrrd/methodsNrrd.c
teem/trunk/src/nrrd/nrrd.h
teem/trunk/src/nrrd/resampleContext.c
teem/trunk/src/nrrd/resampleNrrd.c
Modified: teem/trunk/src/TODO.txt
===================================================================
--- teem/trunk/src/TODO.txt 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/TODO.txt 2025-09-09 15:18:04 UTC (rev 7377)
@@ -144,7 +144,6 @@
- add fields for "if I don't interpolate, what's my approximate inverse?"
- add statement of accuracy (in a Taylor series sense)
- add: am I an odd or even function
-******* - rename numParm --> parmNum
******* - fix the kernels that meetNrrdKernelAllCheck revealed to be broken
* with NrrdFormat:
- There is now an available() method, but this is incomplete - EPS is
Modified: teem/trunk/src/bin/qbert.c
===================================================================
--- teem/trunk/src/bin/qbert.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/bin/qbert.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -54,7 +54,7 @@
fprintf(stderr, "%d --> %s resample\n", need, need ? "WILL" : "won't");
if (need) {
rsi->kernel[i] = uk->kernel;
- memcpy(rsi->parm[i], uk->parm, uk->kernel->numParm * sizeof(double));
+ memcpy(rsi->parm[i], uk->parm, uk->kernel->parmNum * sizeof(double));
if (!AIR_EXISTS(nin->axis[i].min)) {
nin->axis[i].min = 0.0;
}
@@ -144,7 +144,7 @@
char stmp1[AIR_STRLEN_SMALL + 1], stmp2[AIR_STRLEN_SMALL + 1];
need = 1;
rsi->kernel[i] = dk->kernel;
- memcpy(rsi->parm[i], dk->parm, dk->kernel->numParm * sizeof(double));
+ memcpy(rsi->parm[i], dk->parm, dk->kernel->parmNum * sizeof(double));
rsi->samples[i] = sz[i];
if (!AIR_EXISTS(nin->axis[i].min)) {
nin->axis[i].min = 0.0;
Modified: teem/trunk/src/gage/ctx.c
===================================================================
--- teem/trunk/src/gage/ctx.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/gage/ctx.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -196,7 +196,7 @@
int /* Biff: 1 */
gageKernelSet(gageContext *ctx, int which, const NrrdKernel *k, const double *kparm) {
static const char me[] = "gageKernelSet";
- int numParm;
+ int parmNum;
double support, integral;
if (!(ctx && k && kparm)) {
@@ -211,9 +211,9 @@
if (ctx->verbose) {
fprintf(stderr, "%s: which = %d -> %s\n", me, which, airEnumStr(gageKernel, which));
}
- numParm = k->numParm;
- if (!(AIR_IN_CL(0, numParm, NRRD_KERNEL_PARMS_NUM))) {
- biffAddf(GAGE, "%s: kernel's numParm (%d) not in range [%d,%d]", me, numParm, 0,
+ parmNum = k->parmNum;
+ if (!(AIR_IN_CL(0, parmNum, NRRD_KERNEL_PARMS_NUM))) {
+ biffAddf(GAGE, "%s: kernel's parmNum (%d) not in range [%d,%d]", me, parmNum, 0,
NRRD_KERNEL_PARMS_NUM);
return 1;
}
Modified: teem/trunk/src/meet/meetNrrd.c
===================================================================
--- teem/trunk/src/meet/meetNrrd.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/meet/meetNrrd.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -273,7 +273,7 @@
}
kj++;
}
- pnum = kk->numParm;
+ pnum = kk->parmNum;
EE = 0;
/* the second argument to CHECK is how much to scale up the
permissible error in kernel evaluations (between float and double)
Modified: teem/trunk/src/nrrd/kernel.c
===================================================================
--- teem/trunk/src/nrrd/kernel.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/nrrd/kernel.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -26,7 +26,7 @@
** has to be updated to record which kernels (including their derivatives)
** use parm[0] for scale.
- numParm parm[0] parm[1] parm[2]
+ parmNum parm[0] parm[1] parm[2]
nrrdKernelZero 1 scale
nrrdKernelCheap 1 scale
nrrdKernelBox 1 scale
@@ -3128,9 +3128,9 @@
airMopError(mop);
return 1;
}
- if ((*kernelP)->numParm > NRRD_KERNEL_PARMS_NUM) {
+ if ((*kernelP)->parmNum > NRRD_KERNEL_PARMS_NUM) {
biffAddf(NRRD, "%s: kernel \"%s\" requests %d parameters > max %d", me, kstr,
- (*kernelP)->numParm, NRRD_KERNEL_PARMS_NUM);
+ (*kernelP)->parmNum, NRRD_KERNEL_PARMS_NUM);
airMopError(mop);
return 1;
}
@@ -3142,12 +3142,12 @@
|| *kernelP == nrrdKernelCos4SupportDebugDD
|| *kernelP == nrrdKernelCos4SupportDebugDDD) {
/* for these kernels, we need all the parameters given explicitly */
- needParm = (*kernelP)->numParm;
+ needParm = (*kernelP)->parmNum;
} else {
/* For everything else (note that TMF kernels are handled
separately), we can make do with one less than the required,
by using the default spacing */
- needParm = ((*kernelP)->numParm > 0 ? (*kernelP)->numParm - 1 : 0);
+ needParm = ((*kernelP)->parmNum > 0 ? (*kernelP)->parmNum - 1 : 0);
}
if (needParm > 0 && !pstr) {
biffAddf(NRRD,
@@ -3157,7 +3157,7 @@
airMopError(mop);
return 1;
}
- for (haveParm = 0; haveParm < (*kernelP)->numParm; haveParm++) {
+ for (haveParm = 0; haveParm < (*kernelP)->parmNum; haveParm++) {
if (!pstr) break;
if (1 != airSingleSscanf(pstr, "%lg", parm + haveParm)) {
biffAddf(NRRD, "%s: trouble parsing \"%s\" as double (in \"%s\")", me, _pstr,
@@ -3183,7 +3183,7 @@
me, haveParm, needParm, _pstr, _str);
airMopError(mop);
return 1;
- } else if (haveParm == needParm && needParm == (*kernelP)->numParm - 1) {
+ } else if (haveParm == needParm && needParm == (*kernelP)->parmNum - 1) {
/* shift up parsed values, and set parm[0] to default */
for (jj = haveParm; jj >= 1; jj--) {
parm[jj] = parm[jj - 1];
@@ -3192,7 +3192,7 @@
} else {
if (pstr) {
biffAddf(NRRD, "%s: \"%s\" (in \"%s\") has more than %d doubles", me, _pstr,
- _str, (*kernelP)->numParm);
+ _str, (*kernelP)->parmNum);
airMopError(mop);
return 1;
}
@@ -3268,9 +3268,9 @@
}
} else {
strcpy(str, ksp->kernel->name);
- if (ksp->kernel->numParm) {
+ if (ksp->kernel->parmNum) {
unsigned int pi;
- for (pi = 0; pi < ksp->kernel->numParm; pi++) {
+ for (pi = 0; pi < ksp->kernel->parmNum; pi++) {
sprintf(stmp, "%c%.17g", (!pi ? ':' : ','), ksp->parm[pi]);
if (strlen(str) + strlen(stmp) > warnLen) {
biffAddf(NRRD, "%s: kernel parm %u could overflow", me, pi);
@@ -3320,7 +3320,7 @@
}
return 0;
}
- pnum = kernA->numParm;
+ pnum = kernA->parmNum;
if (!pnum) {
/* actually, we're done: no parms and kernels are equal */
*differ = 0;
Modified: teem/trunk/src/nrrd/methodsNrrd.c
===================================================================
--- teem/trunk/src/nrrd/methodsNrrd.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/nrrd/methodsNrrd.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -426,7 +426,7 @@
if (ksp && k && kparm) {
ksp->kernel = k;
- for (p = 0; p < (k->numParm); p++) {
+ for (p = 0; p < (k->parmNum); p++) {
ksp->parm[p] = kparm[p];
}
}
Modified: teem/trunk/src/nrrd/nrrd.h
===================================================================
--- teem/trunk/src/nrrd/nrrd.h 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/nrrd/nrrd.h 2025-09-09 15:18:04 UTC (rev 7377)
@@ -512,7 +512,7 @@
char name[AIR_STRLEN_SMALL + 1];
/* number of parameters needed (# elements in parm[] used) */
- unsigned int numParm; /* HEY: should be "parmNum" in standard convention */
+ unsigned int parmNum;
/* smallest x (x > 0) such that k(y) = 0 for all y > x, y < -x */
double (*support)(const double *parm);
Modified: teem/trunk/src/nrrd/resampleContext.c
===================================================================
--- teem/trunk/src/nrrd/resampleContext.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/nrrd/resampleContext.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -284,7 +284,7 @@
rsmc->axis[axIdx].kernel = kernel;
if (kernel) {
- for (kpIdx = 0; kpIdx < kernel->numParm; kpIdx++) {
+ for (kpIdx = 0; kpIdx < kernel->parmNum; kpIdx++) {
rsmc->axis[axIdx].kparm[kpIdx] = kparm[kpIdx];
}
if (rsmc->verbose) {
@@ -626,7 +626,7 @@
biffAddf(NRRD, "%s: don't have min, max set on axis %u", me, axIdx);
return 1;
}
- for (kpIdx = 0; kpIdx < axis->kernel->numParm; kpIdx++) {
+ for (kpIdx = 0; kpIdx < axis->kernel->parmNum; kpIdx++) {
if (!AIR_EXISTS(axis->kparm[kpIdx])) {
biffAddf(NRRD, "%s: didn't set kernel parm %u on axis %u", me, kpIdx, axIdx);
return 1;
@@ -794,7 +794,7 @@
nrrdKernelParm0IsScale(), we have to do what we probably should have been done
all along: simulating the kernel scaling by pre-processing the evaluation
locations and post-processing the kernel weights */
- if (0 == axis->kernel->numParm || !nrrdKernelParm0IsScale(axis->kernel)) {
+ if (0 == axis->kernel->parmNum || !nrrdKernelParm0IsScale(axis->kernel)) {
size_t nn, ii;
double ratio;
nn = dotLen * axis->samples;
Modified: teem/trunk/src/nrrd/resampleNrrd.c
===================================================================
--- teem/trunk/src/nrrd/resampleNrrd.c 2025-09-09 14:43:50 UTC (rev 7376)
+++ teem/trunk/src/nrrd/resampleNrrd.c 2025-09-09 15:18:04 UTC (rev 7377)
@@ -62,7 +62,7 @@
return 1;
}
- np = kernel->numParm;
+ np = kernel->parmNum;
for (ai = 0; ai < nin->dim; ai++) {
double axmin, axmax;
info->kernel[ai] = kernel;
@@ -162,7 +162,7 @@
biffAddf(NRRD, "%s: info's axis %d min,max not both set", me, ai);
return 1;
}
- np = k->numParm;
+ np = k->parmNum;
for (p = 0; p < np; p++) {
if (!AIR_EXISTS(info->parm[ai][p])) {
biffAddf(NRRD, "%s: didn't set parameter %d (of %d) for axis %d\n", me, p, np,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 14:43:55
|
Revision: 7376
http://sourceforge.net/p/teem/code/7376
Author: kindlmann
Date: 2025-09-09 14:43:50 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
CTesting is working again for Teem v2
Modified Paths:
--------------
teem/trunk/tests/ctest/CMakeLists.txt
teem/trunk/tests/ctest/gage/CMakeLists.txt
teem/trunk/tests/ctest/gage/probeMulti.c
teem/trunk/tests/ctest/gage/probePolynomial.c
teem/trunk/tests/ctest/gage/probeScl.c
teem/trunk/tests/ctest/gage/tsbp.c
teem/trunk/tests/ctest/meet/CMakeLists.txt
teem/trunk/tests/ctest/meet/buildinfo.c
teem/trunk/tests/ctest/meet/enmall.c
teem/trunk/tests/ctest/meet/kernall.c
teem/trunk/tests/ctest/meet/probeSS.c
teem/trunk/tests/ctest/nrrd/CMakeLists.txt
teem/trunk/tests/ctest/ten/CMakeLists.txt
teem/trunk/tests/ctest/ten/glyphBqd.c
teem/trunk/tests/ctest/ten/tendlist.c
Modified: teem/trunk/tests/ctest/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,11 +1,14 @@
# tests/ctest/CMakeLists.txt: Test driver for Teem's CTest-based tests
# Copyright (C) 2025 University of Chicago
# See ../../LICENSE.txt for licensing terms
+
+# Note: these tests are very incomplete. It is unclear how much of Teem's
+# future development will hinge on CTest-based testing, now that the
+# Python/CFFI bindings offer a more convenient way to call into Teem. But they
+# do test something useful, and now for the Teem v2 re-write they work again.
+
+# To run tests (from top-level):
#
-# Note: these tests are very incomplete. It is unclear how much of Teem's future
-# development will hinge on CTest-based testing, now that the Python/CFFI bindings
-# offer a more convenient way to call into Teem. But to use them (from top-level):
-#
# # for running tests locally
# cmake -S . -B <builddir> -DBUILD_TESTING=ON
# cmake --build <builddir>
@@ -14,13 +17,13 @@
# ctest -V # verbose
#
# # for submitting dashboard
-# cd build
+# cd <builddir>
# ctest -D Nightly # or Experimental, Continuous
###-------------------------------------------------------------------------------------
# Basic set-up
-message(STATUS "Setting up testing")
+message(STATUS "Setting up testing in tests/ctest/")
# Make sure tests can see headers generated by the build system
include_directories(${CMAKE_BINARY_DIR}/include)
@@ -108,7 +111,7 @@
# The Tests (such as they are)
#
# These are the component libraries that have tests; more added as time permits
-# (TEEM_LIB_LIST) except that most (those yearning for tests) are commented out
+# TEEM_LIB_LIST except that most (those libs yearning for tests) are commented out
add_subdirectory(air)
# add_subdirectory(hest)
add_subdirectory(biff)
@@ -118,7 +121,7 @@
add_subdirectory(unrrdu)
# add_subdirectory(alan)
# add_subdirectory(tijk)
-#add_subdirectory(gage) # TOFIX
+add_subdirectory(gage)
# add_subdirectory(dye)
# add_subdirectory(bane)
# add_subdirectory(limn)
@@ -125,10 +128,10 @@
# add_subdirectory(echo)
# add_subdirectory(hoover)
# add_subdirectory(seek)
-#add_subdirectory(ten) # TOFIX
+add_subdirectory(ten)
# add_subdirectory(elf)
# add_subdirectory(pull)
# add_subdirectory(coil)
# add_subdirectory(push)
# add_subdirectory(mite)
-#add_subdirectory(meet) # TOFIX
+add_subdirectory(meet)
Modified: teem/trunk/tests/ctest/gage/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/gage/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,36 +1,12 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_sbp tsbp.c)
-target_link_libraries(test_sbp teem)
-add_test(NAME stackBlurParm COMMAND $<TARGET_FILE:test_sbp> -sbp 0-5-4.2)
+teem_create_test_bin(gage_tsbp tsbp.c)
+teem_add_test(gage_tsbp ARGS -sbp 0-5-4.2)
-add_executable(test_probeScl probeScl.c)
-target_link_libraries(test_probeScl teem)
-add_test(NAME probeScl COMMAND $<TARGET_FILE:test_probeScl>)
+teem_create_test_bin(gage_probeScl probeScl.c)
+teem_add_test(gage_probeScl)
-add_executable(test_probePolynomial probePolynomial.c)
-target_link_libraries(test_probePolynomial teem)
-add_test(NAME probePolynomial COMMAND $<TARGET_FILE:test_probePolynomial>)
+teem_create_test_bin(gage_probePolynomial probePolynomial.c)
+teem_add_test(gage_probePolynomial)
-add_executable(test_probeMulti probeMulti.c)
-target_link_libraries(test_probeMulti teem)
-add_test(NAME probeMulti COMMAND $<TARGET_FILE:test_probeMulti>)
+teem_create_test_bin(gage_probeMulti probeMulti.c)
+teem_add_test(gage_probeMulti)
Modified: teem/trunk/tests/ctest/gage/probeMulti.c
===================================================================
--- teem/trunk/tests/ctest/gage/probeMulti.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/probeMulti.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
+#include <teem/gage.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/gage/probePolynomial.c
===================================================================
--- teem/trunk/tests/ctest/gage/probePolynomial.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/probePolynomial.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
+#include <teem/gage.h>
#define PROBE "probePolynomial"
@@ -40,40 +38,38 @@
** dx = dy = dz = 0 to evaluate the polynomial itself
*/
static double
-polyeval(double coef[POWER_MAX+1][POWER_MAX+1][POWER_MAX+1],
- unsigned int dx, unsigned int dy, unsigned int dz,
- const double pos[3]) {
+polyeval(double coef[POWER_MAX + 1][POWER_MAX + 1][POWER_MAX + 1], unsigned int dx,
+ unsigned int dy, unsigned int dz, const double pos[3]) {
unsigned int xi, yi, zi;
- double tmp, ret,
- xp[POWER_MAX+1], yp[POWER_MAX+1], zp[POWER_MAX+1],
- dc[POWER_MAX+1][POWER_MAX+1] = {
- {1.0, 1.0, 1.0, 1.0}, /* how coeffs are scaled for 0th derivative */
- {0.0, 1.0, 2.0, 3.0}, /* how coeffs are scaled for 1st derivative */
- {0.0, 0.0, 2.0, 6.0}, /* how coeffs are scaled for 2nd derivative */
- {0.0, 0.0, 0.0, 6.0}}; /* how coeffs are scaled for 3rd derivative */
+ double tmp, ret, xp[POWER_MAX + 1], yp[POWER_MAX + 1], zp[POWER_MAX + 1],
+ dc[POWER_MAX + 1][POWER_MAX + 1]
+ = {{1.0, 1.0, 1.0, 1.0}, /* how coeffs are scaled for 0th derivative */
+ {0.0, 1.0, 2.0, 3.0}, /* how coeffs are scaled for 1st derivative */
+ {0.0, 0.0, 2.0, 6.0}, /* how coeffs are scaled for 2nd derivative */
+ {0.0, 0.0, 0.0, 6.0}}; /* how coeffs are scaled for 3rd derivative */
tmp = 1.0;
- for (xi=0; xi<=POWER_MAX; xi++) {
+ for (xi = 0; xi <= POWER_MAX; xi++) {
xp[xi] = tmp;
tmp *= pos[0];
}
tmp = 1.0;
- for (yi=0; yi<=POWER_MAX; yi++) {
+ for (yi = 0; yi <= POWER_MAX; yi++) {
yp[yi] = tmp;
tmp *= pos[1];
}
tmp = 1.0;
- for (zi=0; zi<=POWER_MAX; zi++) {
+ for (zi = 0; zi <= POWER_MAX; zi++) {
zp[zi] = tmp;
tmp *= pos[2];
}
ret = 0.0;
- for (xi=dx; xi<=POWER_MAX; xi++) {
- for (yi=dy; yi<=POWER_MAX; yi++) {
- for (zi=dz; zi<=POWER_MAX; zi++) {
- ret += (coef[xi][yi][zi]*xp[xi-dx]*yp[yi-dy]*zp[zi-dz]
- *dc[dx][xi]*dc[dy][yi]*dc[dz][zi]);
+ for (xi = dx; xi <= POWER_MAX; xi++) {
+ for (yi = dy; yi <= POWER_MAX; yi++) {
+ for (zi = dz; zi <= POWER_MAX; zi++) {
+ ret += (coef[xi][yi][zi] * xp[xi - dx] * yp[yi - dy] * zp[zi - dz] * dc[dx][xi]
+ * dc[dy][yi] * dc[dz][zi]);
}
}
}
@@ -91,8 +87,8 @@
ELL_3V_NORM(vec, vec, tmp);
airNormalRand_r(clen + 0, clen + 1, rng);
/* rician noise, actually */
- clen[0] = lenexp + lensig*clen[0];
- clen[1] = lensig*clen[1];
+ clen[0] = lenexp + lensig * clen[0];
+ clen[1] = lensig * clen[1];
len = ELL_2V_LEN(clen);
ELL_3V_SCALE(vec, len, vec);
}
@@ -104,12 +100,12 @@
*/
static gageContext *
makeVolume(Nrrd *nin, unsigned int sx, unsigned int sy, unsigned int sz,
- double coef[POWER_MAX+1][POWER_MAX+1][POWER_MAX+1],
+ double coef[POWER_MAX + 1][POWER_MAX + 1][POWER_MAX + 1],
airRandMTState *rng) {
- static const char me[]="makeVolume";
- double spcOrig[NRRD_SPACE_DIM_MAX], spcVec[3][NRRD_SPACE_DIM_MAX],
- angle10, angle20, angle21, ooff[3], aperm=0.6, lexp=0.1, lstdv=0.04,
- kparm[NRRD_KERNEL_PARMS_NUM];
+ static const char me[] = "makeVolume";
+ double spcOrig[NRRD_SPACE_DIM_MAX], spcVec[3][NRRD_SPACE_DIM_MAX], angle10, angle20,
+ angle21, ooff[3], aperm = 0.6, lexp = 0.1, lstdv = 0.04,
+ kparm[NRRD_KERNEL_PARMS_NUM];
gageContext *gctx;
gagePerVolume *gpvl;
unsigned int xi, yi, zi;
@@ -121,52 +117,46 @@
do {
randvec(spcVec[1], lexp, lstdv, rng);
angle10 = ell_3v_angle_d(spcVec[1], spcVec[0]);
- } while (!( AIR_IN_OP(AIR_PI*(1-aperm)/2, angle10, AIR_PI*(1+aperm)/2) ));
+ } while (!(AIR_IN_OP(AIR_PI * (1 - aperm) / 2, angle10, AIR_PI * (1 + aperm) / 2)));
do {
randvec(spcVec[2], lexp, lstdv, rng);
angle20 = ell_3v_angle_d(spcVec[2], spcVec[0]);
angle21 = ell_3v_angle_d(spcVec[2], spcVec[1]);
- } while (!( AIR_IN_OP(AIR_PI*(1-aperm)/2, angle20, AIR_PI*(1+aperm)/2) &&
- AIR_IN_OP(AIR_PI*(1-aperm)/2, angle21, AIR_PI*(1+aperm)/2) ));
+ } while (!(AIR_IN_OP(AIR_PI * (1 - aperm) / 2, angle20, AIR_PI * (1 + aperm) / 2)
+ && AIR_IN_OP(AIR_PI * (1 - aperm) / 2, angle21, AIR_PI * (1 + aperm) / 2)));
/* center volume near origin */
airNormalRand_r(ooff + 0, ooff + 1, rng);
airNormalRand_r(ooff + 2, NULL, rng);
ELL_3V_SET(spcOrig, 0.0, 0.0, 0.0);
- ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sx)/2.0 + 2*ooff[0], spcVec[0]);
- ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sy)/2.0 + 2*ooff[1], spcVec[1]);
- ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sz)/2.0 + 2*ooff[1], spcVec[2]);
+ ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sx) / 2.0 + 2 * ooff[0], spcVec[0]);
+ ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sy) / 2.0 + 2 * ooff[1], spcVec[1]);
+ ELL_3V_SCALE_INCR(spcOrig, -AIR_CAST(double, sz) / 2.0 + 2 * ooff[1], spcVec[2]);
/* allocate data */
- if (nrrdMaybeAlloc_va(nin, nrrdTypeDouble, 3,
- AIR_CAST(size_t, sx),
- AIR_CAST(size_t, sy),
- AIR_CAST(size_t, sz))
+ if (nrrdMaybeAlloc_va(nin, nrrdTypeDouble, 3, AIR_CAST(size_t, sx),
+ AIR_CAST(size_t, sy), AIR_CAST(size_t, sz))
|| nrrdSpaceSet(nin, nrrdSpaceRightAnteriorSuperior)
|| nrrdSpaceOriginSet(nin, spcOrig)) {
biffMovef(PROBE, NRRD, "%s: trouble setting volume", me);
- airMopError(submop); return NULL;
+ airMopError(submop);
+ return NULL;
}
- nrrdAxisInfoSet_va(nin, nrrdAxisInfoSpaceDirection,
- spcVec[0],
- spcVec[1],
- spcVec[2]);
- nrrdAxisInfoSet_va(nin, nrrdAxisInfoCenter,
- nrrdCenterCell,
- nrrdCenterCell,
+ nrrdAxisInfoSet_va(nin, nrrdAxisInfoSpaceDirection, spcVec[0], spcVec[1], spcVec[2]);
+ nrrdAxisInfoSet_va(nin, nrrdAxisInfoCenter, nrrdCenterCell, nrrdCenterCell,
nrrdCenterCell);
/* set data */
{
double *ddata = AIR_CAST(double *, nin->data);
- for (zi=0; zi<sz; zi++) {
+ for (zi = 0; zi < sz; zi++) {
double pos[3];
- for (yi=0; yi<sy; yi++) {
- for (xi=0; xi<sx; xi++) {
+ for (yi = 0; yi < sy; yi++) {
+ for (xi = 0; xi < sx; xi++) {
ELL_3V_SCALE_ADD2(pos, 1.0, spcOrig, xi, spcVec[0]);
ELL_3V_SCALE_ADD2(pos, 1.0, pos, yi, spcVec[1]);
ELL_3V_SCALE_ADD2(pos, 1.0, pos, zi, spcVec[2]);
- ddata[xi + sx*(yi + sy*zi)] = polyeval(coef, 0, 0, 0, pos);
+ ddata[xi + sx * (yi + sy * zi)] = polyeval(coef, 0, 0, 0, pos);
}
}
}
@@ -192,7 +182,8 @@
if (!EE) EE |= gageUpdate(gctx);
if (EE) {
biffMovef(PROBE, GAGE, "%s: trouble setting up gage", me);
- airMopError(submop); return NULL;
+ airMopError(submop);
+ return NULL;
}
airMopOkay(submop);
@@ -207,7 +198,7 @@
airRandMTState *rng;
Nrrd *nin;
unsigned int xi, yi, zi, runNum, runIdx;
- double coef[POWER_MAX+1][POWER_MAX+1][POWER_MAX+1], pos[3], epsilon;
+ double coef[POWER_MAX + 1][POWER_MAX + 1][POWER_MAX + 1], pos[3], epsilon;
const double *vmeas, *gmeas, *hmeas;
gageContext *gctx;
@@ -221,7 +212,7 @@
epsilon = 1e-8;
runNum = 30;
- for (runIdx=0; runIdx<runNum; runIdx++) {
+ for (runIdx = 0; runIdx < runNum; runIdx++) {
unsigned int sx, sy, sz, probeNum;
double avgDiff;
airArray *submop;
@@ -228,9 +219,9 @@
submop = airMopNew();
/* set random coefficients in polynomial */
- for (xi=0; xi<=POWER_MAX; xi++) {
- for (yi=0; yi<=POWER_MAX; yi++) {
- for (zi=0; zi<=POWER_MAX; zi++) {
+ for (xi = 0; xi <= POWER_MAX; xi++) {
+ for (yi = 0; yi <= POWER_MAX; yi++) {
+ for (zi = 0; zi <= POWER_MAX; zi++) {
if (xi + yi + zi > POWER_MAX) {
coef[xi][yi][zi] = 0.0;
} else {
@@ -243,11 +234,14 @@
sx = 20 + airRandInt_r(rng, 120);
sy = 20 + airRandInt_r(rng, 120);
sz = 20 + airRandInt_r(rng, 120);
- fprintf(stderr, "%u: %u %u %u: ", runIdx, sx, sy, sz); fflush(stderr);
+ fprintf(stderr, "%u: %u %u %u: ", runIdx, sx, sy, sz);
+ fflush(stderr);
if (!(gctx = makeVolume(nin, sx, sy, sz, coef, rng))) {
airMopAdd(mop, err = biffGetDone(PROBE), airFree, airMopAlways);
fprintf(stderr, "trouble creating volume:\n%s", err);
- airMopError(submop); airMopError(mop); return 1;
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
airMopAdd(submop, gctx, (airMopper)gageContextNix, airMopAlways);
vmeas = gageAnswerPointer(gctx, gctx->pvl[0], gageSclValue);
@@ -254,8 +248,7 @@
gmeas = gageAnswerPointer(gctx, gctx->pvl[0], gageSclGradVec);
hmeas = gageAnswerPointer(gctx, gctx->pvl[0], gageSclHessian);
ELL_3V_SET(pos, 0, 0, 0);
- gageProbeSpace(gctx, pos[0], pos[1], pos[2],
- AIR_FALSE /* indexSpace */,
+ gageProbeSpace(gctx, pos[0], pos[1], pos[2], AIR_FALSE /* indexSpace */,
AIR_TRUE /* clamp */);
probeNum = 0;
avgDiff = 0.0;
@@ -263,8 +256,8 @@
visited positions the gage-measured values, gradients, and
hessians are the same as the analytical ones */
do {
- double vanal, ganal[3], hanal[9], vdiff, gdiff[3], hdiff[9],
- step[3], stepSize = 0.2;
+ double vanal, ganal[3], hanal[9], vdiff, gdiff[3], hdiff[9], step[3],
+ stepSize = 0.2;
probeNum++;
vanal = polyeval(coef, 0, 0, 0, pos);
ganal[0] = polyeval(coef, 1, 0, 0, pos);
@@ -282,21 +275,22 @@
vdiff = fabs(vmeas[0] - vanal);
ELL_3V_SUB(gdiff, gmeas, ganal);
ELL_3M_SUB(hdiff, hmeas, hanal);
- if (vdiff > epsilon ||
- ELL_3V_LEN(gdiff) > epsilon ||
- ELL_3M_FROB(hdiff) > epsilon) {
- fprintf(stderr, "at (%g,%g,%g) one diff %.17g %.17g %.17g "
+ if (vdiff > epsilon || ELL_3V_LEN(gdiff) > epsilon
+ || ELL_3M_FROB(hdiff) > epsilon) {
+ fprintf(stderr,
+ "at (%g,%g,%g) one diff %.17g %.17g %.17g "
"> eps %.17g\n",
- pos[0], pos[1], pos[2], vdiff,
- ELL_3V_LEN(gdiff), ELL_3M_FROB(hdiff), epsilon);
- airMopError(submop); airMopError(mop); return 1;
+ pos[0], pos[1], pos[2], vdiff, ELL_3V_LEN(gdiff), ELL_3M_FROB(hdiff),
+ epsilon);
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
avgDiff += vdiff + ELL_3V_LEN(gdiff) + ELL_3M_FROB(hdiff);
airNormalRand_r(step + 0, step + 1, rng);
airNormalRand_r(step + 2, NULL, rng);
ELL_3V_SCALE_INCR(pos, stepSize, step);
- gageProbeSpace(gctx, pos[0], pos[1], pos[2],
- AIR_FALSE /* indexSpace */,
+ gageProbeSpace(gctx, pos[0], pos[1], pos[2], AIR_FALSE /* indexSpace */,
AIR_TRUE /* clamp */);
} while (!gctx->edgeFrac);
avgDiff /= probeNum;
Modified: teem/trunk/tests/ctest/gage/probeScl.c
===================================================================
--- teem/trunk/tests/ctest/gage/probeScl.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/probeScl.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,26 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
-#include <testDataPath.h>
+#include <teem/gage.h>
+#include <testutil.h>
/*
** Tests:
@@ -83,7 +81,7 @@
nscl = nrrdNew();
airMopAdd(mop, nscl, (airMopper)nrrdNuke, airMopAlways);
- fullname = testDataPathPrefix("fmob-c4h.nrrd");
+ fullname = teemTestDataPath("fmob-c4h.nrrd");
airMopAdd(mop, fullname, airFree, airMopAlways);
if (nrrdLoad(nscl, fullname, NULL)) {
char *err;
@@ -204,7 +202,7 @@
char *corrfn, explain[AIR_STRLEN_LARGE + 1];
int pret, differ;
- corrfn = testDataPathPrefix("test/probeSclAns.nrrd");
+ corrfn = teemTestDataPath("test/probeSclAns.nrrd");
airMopAdd(mop, corrfn, airFree, airMopAlways);
ncorr = nrrdNew();
airMopAdd(mop, ncorr, (airMopper)nrrdNuke, airMopAlways);
Modified: teem/trunk/tests/ctest/gage/tsbp.c
===================================================================
--- teem/trunk/tests/ctest/gage/tsbp.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/gage/tsbp.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/gage.h"
+#include <teem/gage.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/meet/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/meet/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,43 +1,19 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_enmall enmall.c)
-target_link_libraries(test_enmall teem)
-add_test(NAME enmall COMMAND $<TARGET_FILE:test_enmall>)
+teem_create_test_bin(meet_enmall enmall.c)
+teem_add_test(meet_enmall)
-add_executable(test_kernall kernall.c)
-target_link_libraries(test_kernall teem)
-add_test(NAME kernall COMMAND $<TARGET_FILE:test_kernall>)
+teem_create_test_bin(meet_kernall kernall.c)
+teem_add_test(meet_kernall)
-add_executable(test_buildinfo buildinfo.c)
-target_link_libraries(test_buildinfo teem)
-add_test(NAME buildinfo COMMAND $<TARGET_FILE:test_buildinfo>)
+teem_create_test_bin(meet_buildinfo buildinfo.c)
+teem_add_test(meet_buildinfo)
-add_executable(test_probeSS probeSS.c)
-target_link_libraries(test_probeSS teem)
-add_test(NAME probeSS_box01 COMMAND $<TARGET_FILE:test_probeSS> -k box -supp 1.0 -pnum 1500)
-add_test(NAME probeSS_cos01 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 1.0 -pnum 1500)
-add_test(NAME probeSS_cos02 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 2.0 -pnum 1200)
-add_test(NAME probeSS_cos04 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 4.0 -pnum 1000)
-add_test(NAME probeSS_cos10 COMMAND $<TARGET_FILE:test_probeSS> -k cos -supp 9.0 -pnum 800)
-add_test(NAME probeSS_ctmr02 COMMAND $<TARGET_FILE:test_probeSS> -k ctmr -supp 2.0 -pnum 1300)
-add_test(NAME probeSS_ctmr04 COMMAND $<TARGET_FILE:test_probeSS> -k ctmr -supp 4.0 -pnum 1300)
-add_test(NAME probeSS_ctmr10 COMMAND $<TARGET_FILE:test_probeSS> -k ctmr -supp 9.0 -pnum 1300)
+teem_create_test_bin(meet_probeSS probeSS.c)
+teem_add_test(meet_probeSS NAME meet_probeSS_box01 ARGS -k box -supp 1.0 -pnum 1500)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos01 ARGS -k cos -supp 1.0 -pnum 1500)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos02 ARGS -k cos -supp 2.0 -pnum 1200)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos04 ARGS -k cos -supp 4.0 -pnum 1000)
+teem_add_test(meet_probeSS NAME meet_probeSS_cos10 ARGS -k cos -supp 9.0 -pnum 800)
+teem_add_test(meet_probeSS NAME meet_probeSS_ctmr02 ARGS -k ctmr -supp 2.0 -pnum 1300)
+teem_add_test(meet_probeSS NAME meet_probeSS_ctmr04 ARGS -k ctmr -supp 4.0 -pnum 1300)
+teem_add_test(meet_probeSS NAME meet_probeSS_ctmr10 ARGS -k ctmr -supp 9.0 -pnum 1300)
Modified: teem/trunk/tests/ctest/meet/buildinfo.c
===================================================================
--- teem/trunk/tests/ctest/meet/buildinfo.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/buildinfo.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** describes how this Teem was built
@@ -37,7 +35,6 @@
/* some of the things from airSanity */
printf("airMyEndian() == %d\n", airMyEndian());
- printf("AIR_QNANHIBIT == %d\n", AIR_QNANHIBIT);
printf("sizeof(size_t) = %s; sizeof(void*) = %s\n",
airSprintSize_t(stmp1, sizeof(size_t)),
airSprintSize_t(stmp2, sizeof(void *)));
Modified: teem/trunk/tests/ctest/meet/enmall.c
===================================================================
--- teem/trunk/tests/ctest/meet/enmall.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/enmall.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/meet/kernall.c
===================================================================
--- teem/trunk/tests/ctest/meet/kernall.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/kernall.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/meet/probeSS.c
===================================================================
--- teem/trunk/tests/ctest/meet/probeSS.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/meet/probeSS.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/meet.h"
+#include <teem/meet.h>
/*
** Tests:
@@ -553,7 +551,7 @@
}
static int
-multiAnswerCompare(multiAnswer *man1, multiAnswer *man2) {
+multiAnswerCompare(multiAnswer *man1, multiAnswer *man2, double eps) {
static const char me[] = "multiAnswerCompare";
unsigned int si, slen;
@@ -567,12 +565,17 @@
slen = AIR_MIN(man1->slen, man2->slen);
#endif
for (si = 0; si < slen; si++) {
- if (man1->san[si] != man2->san[si]) {
+ double v1 = man1->san[si], v2 = man2->san[si];
+ double avg = (fabs(v1) + fabs(v2)) / 2;
+ double diff = fabs(v1 - v2) / (avg ? avg : 1);
+ if (diff > eps) {
/* HEY should track down which part of which answer,
in man1 and man2, is different, which was the
purpose of recording ispec and sidx */
- biffAddf(BKEY, "%s: man1->san[si] %.17g != man2->san[si] %.17g", me, man1->san[si],
- man2->san[si]);
+ biffAddf(
+ BKEY,
+ "%s: relerr(man1->san[si] %.17g , man2->san[si] %.17g) = %.17g > eps %.17g", me,
+ man1->san[si], man2->san[si], diff, eps);
return 1;
}
}
@@ -804,7 +807,8 @@
multiAnswerCollect(man[kindIdx]);
multiAnswerCollect(manComp[kindIdx]);
- if (multiAnswerCompare(manComp[kindIdx], man[kindIdx])) {
+ /* HEY HEY why on earth can't this be exactly the same? */
+ if (multiAnswerCompare(manComp[kindIdx], man[kindIdx], 1e-7)) {
biffAddf(BKEY, "%s: on point %u of kindIdx %u", me, probeIdx, kindIdx);
return 1;
}
Modified: teem/trunk/tests/ctest/nrrd/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/nrrd/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/nrrd/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -8,12 +8,12 @@
teem_add_test(nrrd_tload)
teem_create_test_bin(nrrd_tskip tskip.c USE_TMPDIR)
-teem_add_test(nrrd_tskip NAME tskip11p ARGS -s 101 102 103 -p 66 81 -o tsA.raw tsA.nhdr)
-teem_add_test(nrrd_tskip NAME tskip11n ARGS -s 101 102 103 -p 66 81 -ns -o tsB.raw tsB.nhdr)
-teem_add_test(nrrd_tskip NAME tskip01p ARGS -s 101 102 103 -p 0 99 -o tsC.raw tsC.nhdr)
-teem_add_test(nrrd_tskip NAME tskip01n ARGS -s 101 102 103 -p 0 99 -ns -o tsD.raw tsD.nhdr)
-teem_add_test(nrrd_tskip NAME tskip10p ARGS -s 101 102 103 -p 77 0 -o tsE.raw tsE.nhdr)
-teem_add_test(nrrd_tskip NAME tskip10n ARGS -s 101 102 103 -p 77 0 -ns -o tsF.raw tsF.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip11p ARGS -s 101 102 103 -p 66 81 -o tsA.raw tsA.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip11n ARGS -s 101 102 103 -p 66 81 -ns -o tsB.raw tsB.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip01p ARGS -s 101 102 103 -p 0 99 -o tsC.raw tsC.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip01n ARGS -s 101 102 103 -p 0 99 -ns -o tsD.raw tsD.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip10p ARGS -s 101 102 103 -p 77 0 -o tsE.raw tsE.nhdr)
+teem_add_test(nrrd_tskip NAME nrrd_tskip10n ARGS -s 101 102 103 -p 77 0 -ns -o tsF.raw tsF.nhdr)
teem_create_test_bin(nrrd_macros macros.c)
teem_add_test(nrrd_macros)
Modified: teem/trunk/tests/ctest/ten/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/ten/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/ten/CMakeLists.txt 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,28 +1,6 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_tendlist tendlist.c)
-target_link_libraries(test_tendlist teem)
-add_test(NAME tendlist COMMAND $<TARGET_FILE:test_tendlist>)
+teem_create_test_bin(ten_tendlist tendlist.c)
+teem_add_test(ten_tendlist)
-add_executable(test_glyphBqd glyphBqd.c)
-target_link_libraries(test_glyphBqd teem)
-add_test(NAME glyphBqd COMMAND $<TARGET_FILE:test_glyphBqd>)
+teem_create_test_bin(ten_glyphBqd glyphBqd.c)
+teem_add_test(ten_glyphBqd)
Modified: teem/trunk/tests/ctest/ten/glyphBqd.c
===================================================================
--- teem/trunk/tests/ctest/ten/glyphBqd.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/ten/glyphBqd.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,26 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/ten.h"
-#include <testDataPath.h>
+#include <teem/ten.h>
+#include <testutil.h>
/*
** Tests:
@@ -43,7 +41,7 @@
sz = 100;
betaMaxNum = AIR_CAST(unsigned int, sizeof(betaMax) / sizeof(double));
if (nrrdMaybeAlloc_va(nabc, nrrdTypeDouble, 3, AIR_CAST(size_t, 3),
- AIR_CAST(size_t, sz), AIR_CAST(size_t, sz * betaMaxNum))) {
+ AIR_CAST(size_t, sz), AIR_CAST(size_t, sz *betaMaxNum))) {
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "trouble allocating:\n%s", err);
airMopError(mop);
@@ -61,7 +59,7 @@
}
}
- refname = testDataPathPrefix("test/tenGlyphBqdAbcUv.nrrd");
+ refname = teemTestDataPath("test/tenGlyphBqdAbcUv.nrrd");
airMopAdd(mop, refname, airFree, airMopAlways);
nref = nrrdNew();
airMopAdd(mop, nref, (airMopper)nrrdNuke, airMopAlways);
Modified: teem/trunk/tests/ctest/ten/tendlist.c
===================================================================
--- teem/trunk/tests/ctest/ten/tendlist.c 2025-09-09 05:20:55 UTC (rev 7375)
+++ teem/trunk/tests/ctest/ten/tendlist.c 2025-09-09 14:43:50 UTC (rev 7376)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/ten.h"
+#include <teem/ten.h>
/*
** Tests:
@@ -50,11 +48,10 @@
tci = 0;
do {
- fprintf(out, "%s: ################### BEGIN tend %s\n",
- me, tendCmdList[tci]->name);
+ fprintf(out, "%s: ################### BEGIN tend %s\n", me, tendCmdList[tci]->name);
ret = tendCmdList[tci]->main(0, NULL, tendCmdList[tci]->name, hparm);
- fprintf(out, "%s: ################### END tend %s (ret=%d)\n",
- me, tendCmdList[tci]->name, ret);
+ fprintf(out, "%s: ################### END tend %s (ret=%d)\n", me,
+ tendCmdList[tci]->name, ret);
tci++;
} while (tendCmdList[tci]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 05:20:57
|
Revision: 7375
http://sourceforge.net/p/teem/code/7375
Author: kindlmann
Date: 2025-09-09 05:20:55 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
still in progress resurrecting CTests
Modified Paths:
--------------
teem/trunk/tests/ctest/CMakeLists.txt
teem/trunk/tests/ctest/air/CMakeLists.txt
teem/trunk/tests/ctest/biff/CMakeLists.txt
teem/trunk/tests/ctest/biff/test.c
teem/trunk/tests/ctest/nrrd/CMakeLists.txt
teem/trunk/tests/ctest/nrrd/macros.c
teem/trunk/tests/ctest/nrrd/sanity.c
teem/trunk/tests/ctest/nrrd/tbspec.c
teem/trunk/tests/ctest/nrrd/tload.c
teem/trunk/tests/ctest/nrrd/trand.c
teem/trunk/tests/ctest/nrrd/tskip.c
teem/trunk/tests/ctest/unrrdu/CMakeLists.txt
teem/trunk/tests/ctest/unrrdu/unulist.c
Modified: teem/trunk/tests/ctest/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/CMakeLists.txt 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
@@ -32,10 +32,10 @@
###-------------------------------------------------------------------------------------
# Two helper functions for creating and describing tests:
-# teem_create_test_executable: creates the executable test program
+# teem_create_test_bin: creates the executable test program
# teem_add_test: uses the executable to declare a new test
-# teem_create_test_executable(<target> <src> [USE_TMPDIR]):
+# teem_create_test_bin(<target> <src> [USE_TMPDIR]):
# From test program source file <src> create executable, hereafter referred to as
# <target>. If USE_TMPDIR, then create a tmp directory "<target>_tmp" that the test can
# use for writing files. Attach the necessary environment variables to the target, to be
@@ -44,7 +44,7 @@
# the source code of the test program, than the circumstances of how the test executable
# is run.
#
-function(teem_create_test_executable target src)
+function(teem_create_test_bin target src)
set(options USE_TMPDIR)
# this sets TCTE_USE_TMPDIR if "USE_TMPDIR" was passed
cmake_parse_arguments(TCTE "${options}" "" "" ${ARGN})
@@ -65,7 +65,7 @@
# teem_add_test(<target> [NAME <name>] [ARGS <args>...])
# This creates the CTest test via add_test() around the <target> created by
-# teem_create_test_executable above. The NAME option, if used, creates a name for the
+# teem_create_test_bin above. The NAME option, if used, creates a name for the
# test different than ${target} The ARGS option says how to run it on the command-line.
#
function(teem_add_test target)
@@ -105,7 +105,30 @@
endfunction()
###-------------------------------------------------------------------------------------
-# The Tests!
+# The Tests (such as they are)
#
# These are the component libraries that have tests; more added as time permits
+# (TEEM_LIB_LIST) except that most (those yearning for tests) are commented out
add_subdirectory(air)
+# add_subdirectory(hest)
+add_subdirectory(biff)
+add_subdirectory(nrrd)
+# add_subdirectory(ell)
+# add_subdirectory(moss)
+add_subdirectory(unrrdu)
+# add_subdirectory(alan)
+# add_subdirectory(tijk)
+#add_subdirectory(gage) # TOFIX
+# add_subdirectory(dye)
+# add_subdirectory(bane)
+# add_subdirectory(limn)
+# add_subdirectory(echo)
+# add_subdirectory(hoover)
+# add_subdirectory(seek)
+#add_subdirectory(ten) # TOFIX
+# add_subdirectory(elf)
+# add_subdirectory(pull)
+# add_subdirectory(coil)
+# add_subdirectory(push)
+# add_subdirectory(mite)
+#add_subdirectory(meet) # TOFIX
Modified: teem/trunk/tests/ctest/air/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/air/CMakeLists.txt 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/air/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,18 +1,18 @@
-teem_create_test_executable(test_miscAir miscAir.c)
-teem_add_test(test_miscAir)
+teem_create_test_bin(air_miscAir miscAir.c)
+teem_add_test(air_miscAir)
-teem_create_test_executable(test_mtrand mtrand.c)
-teem_add_test(test_mtrand)
+teem_create_test_bin(air_mtrand mtrand.c)
+teem_add_test(air_mtrand)
-teem_create_test_executable(test_amath amath.c)
-teem_add_test(test_amath)
+teem_create_test_bin(air_amath amath.c)
+teem_add_test(air_amath)
-teem_create_test_executable(test_string string.c)
-teem_add_test(test_string)
+teem_create_test_bin(air_string string.c)
+teem_add_test(air_string)
-teem_create_test_executable(test_strtok strtok.c)
-teem_add_test(test_strtok)
+teem_create_test_bin(air_strtok strtok.c)
+teem_add_test(air_strtok)
-teem_create_test_executable(test_pptest pptest.c)
-teem_add_test(test_pptest)
+teem_create_test_bin(air_pptest pptest.c)
+teem_add_test(air_pptest)
Modified: teem/trunk/tests/ctest/biff/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/biff/CMakeLists.txt 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/biff/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,24 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_biff test.c)
-target_link_libraries(test_biff teem)
-add_test(NAME biff COMMAND $<TARGET_FILE:test_biff>)
+teem_create_test_bin(biff_test test.c)
+teem_add_test(biff_test)
Modified: teem/trunk/tests/ctest/biff/test.c
===================================================================
--- teem/trunk/tests/ctest/biff/test.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/biff/test.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,27 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
+#include <teem/biff.h>
-#include "teem/biff.h"
-
/*
** Tests:
** biffAdd
@@ -60,25 +57,24 @@
biffAdd("bingo", "the third error bingo");
biffAdd("axis", "the third error axis");
{
- char good[] =
- "[bingo] the third error bingo\n"
- "[bingo] the second bll boo boo boo error bingo\n"
- "[bingo] the first error bingo\n"
- "[bingo] [chard] the third error chard\n"
- "[bingo] [chard] the second error chard\n"
- "[bingo] [chard] the first error chard\n"
- "[bingo] zero-eth bingo message\n";
+ char good[] = "[bingo] the third error bingo\n"
+ "[bingo] the second bll boo boo boo error bingo\n"
+ "[bingo] the first error bingo\n"
+ "[bingo] [chard] the third error chard\n"
+ "[bingo] [chard] the second error chard\n"
+ "[bingo] [chard] the first error chard\n"
+ "[bingo] zero-eth bingo message\n";
tmp = biffGet("bingo");
airMopAdd(mop, tmp, airFree, airMopAlways);
/* an ugly macro */
-#define COMPARE(N) \
- airMopAdd(mop, tmp, airFree, airMopAlways); \
- if (strcmp(tmp, good)) { \
- fprintf(stderr, "%s: %d: #%s# != #%s#\n", me, N, tmp, good); \
- airMopError(mop); \
- exit(1); \
- }
+#define COMPARE(N) \
+ airMopAdd(mop, tmp, airFree, airMopAlways); \
+ if (strcmp(tmp, good)) { \
+ fprintf(stderr, "%s: %d: #%s# != #%s#\n", me, N, tmp, good); \
+ airMopError(mop); \
+ exit(1); \
+ }
COMPARE(1);
}
@@ -90,10 +86,9 @@
}
{
- char good[] =
- "[axis] the third error axis\n"
- "[axis] the second error axis\n"
- "[axis] the first error axis\n";
+ char good[] = "[axis] the third error axis\n"
+ "[axis] the second error axis\n"
+ "[axis] the first error axis\n";
tmp = biffGet("axis");
COMPARE(3);
}
@@ -102,10 +97,9 @@
biffAdd("harold", "the second error harold");
biffAdd("harold", "the third error harold");
{
- char good[] =
- "[harold] the third error harold\n"
- "[harold] the second error harold\n"
- "[harold] the first error harold\n";
+ char good[] = "[harold] the third error harold\n"
+ "[harold] the second error harold\n"
+ "[harold] the first error harold\n";
tmp = biffGetDone("harold");
COMPARE(4);
}
@@ -120,12 +114,11 @@
biffAdd("axis", "the fourth error axis");
biffAdd("axis", "the fifth error axis");
{
- char good[] =
- "[axis] the fifth error axis\n"
- "[axis] the fourth error axis\n"
- "[axis] the third error axis\n"
- "[axis] the second error axis\n"
- "[axis] the first error axis\n";
+ char good[] = "[axis] the fifth error axis\n"
+ "[axis] the fourth error axis\n"
+ "[axis] the third error axis\n"
+ "[axis] the second error axis\n"
+ "[axis] the first error axis\n";
tmp = biffGetDone("axis");
COMPARE(5);
}
@@ -140,9 +133,8 @@
biffAddf("test2", "%s: this is a test of biffAddf %d %g", "me", 1, 4.2);
biffMovef("test3", "test2", "%s: testing biffMove %d.", "me", 1729);
{
- char good[] =
- "[test3] me: testing biffMove 1729.\n"
- "[test3] [test2] me: this is a test of biffAddf 1 4.2\n";
+ char good[] = "[test3] me: testing biffMove 1729.\n"
+ "[test3] [test2] me: this is a test of biffAddf 1 4.2\n";
tmp = biffGet("test3");
COMPARE(7);
}
Modified: teem/trunk/tests/ctest/nrrd/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/nrrd/CMakeLists.txt 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,50 +1,23 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
+teem_create_test_bin(nrrd_sanity sanity.c)
+teem_add_test(nrrd_sanity)
-add_executable(test_trand trand.c)
-target_link_libraries(test_trand teem)
-add_test(NAME trand COMMAND $<TARGET_FILE:test_trand>)
+teem_create_test_bin(nrrd_trand trand.c USE_TMPDIR)
+teem_add_test(nrrd_trand)
-add_executable(test_tload tload.c)
-target_link_libraries(test_tload teem)
-add_test(NAME tload COMMAND $<TARGET_FILE:test_tload>)
+teem_create_test_bin(nrrd_tload tload.c USE_TMPDIR)
+teem_add_test(nrrd_tload)
-add_executable(test_tskip tskip.c)
-target_link_libraries(test_tskip teem)
-# Note the different file names; tests are run in parallel
-add_test(NAME tskip11p COMMAND $<TARGET_FILE:test_tskip> -s 101 102 103 -p 66 81 -o tsA.raw tsA.nhdr)
-add_test(NAME tskip11n COMMAND $<TARGET_FILE:test_tskip> -s 101 102 103 -p 66 81 -ns -o tsB.raw tsB.nhdr)
-add_test(NAME tskip01p COMMAND $<TARGET_FILE:test_tskip> -s 101 102 103 -p 0 99 -o tsC.raw tsC.nhdr)
-add_test(NAME tskip01n COMMAND $<TARGET_FILE:test_tskip> -s 101 102 103 -p 0 99 -ns -o tsD.raw tsD.nhdr)
-add_test(NAME tskip10p COMMAND $<TARGET_FILE:test_tskip> -s 101 102 103 -p 77 0 -o tsE.raw tsE.nhdr)
-add_test(NAME tskip10n COMMAND $<TARGET_FILE:test_tskip> -s 101 102 103 -p 77 0 -ns -o tsF.raw tsF.nhdr)
+teem_create_test_bin(nrrd_tskip tskip.c USE_TMPDIR)
+teem_add_test(nrrd_tskip NAME tskip11p ARGS -s 101 102 103 -p 66 81 -o tsA.raw tsA.nhdr)
+teem_add_test(nrrd_tskip NAME tskip11n ARGS -s 101 102 103 -p 66 81 -ns -o tsB.raw tsB.nhdr)
+teem_add_test(nrrd_tskip NAME tskip01p ARGS -s 101 102 103 -p 0 99 -o tsC.raw tsC.nhdr)
+teem_add_test(nrrd_tskip NAME tskip01n ARGS -s 101 102 103 -p 0 99 -ns -o tsD.raw tsD.nhdr)
+teem_add_test(nrrd_tskip NAME tskip10p ARGS -s 101 102 103 -p 77 0 -o tsE.raw tsE.nhdr)
+teem_add_test(nrrd_tskip NAME tskip10n ARGS -s 101 102 103 -p 77 0 -ns -o tsF.raw tsF.nhdr)
-add_executable(test_sanity sanity.c)
-target_link_libraries(test_sanity teem)
-add_test(NAME sanity COMMAND $<TARGET_FILE:test_sanity>)
+teem_create_test_bin(nrrd_macros macros.c)
+teem_add_test(nrrd_macros)
-add_executable(test_macros macros.c)
-target_link_libraries(test_macros teem)
-add_test(NAME macros COMMAND $<TARGET_FILE:test_macros>)
-
-add_executable(test_bspec tbspec.c)
-target_link_libraries(test_bspec teem)
-add_test(NAME bspec COMMAND $<TARGET_FILE:test_bspec> -bs bleed wrap pad:42)
+teem_create_test_bin(nrrd_bspec tbspec.c)
+teem_add_test(nrrd_bspec ARGS -bs bleed wrap pad:42)
+# HEY why not more nrrd_bspec tests?
Modified: teem/trunk/tests/ctest/nrrd/macros.c
===================================================================
--- teem/trunk/tests/ctest/nrrd/macros.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/macros.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,20 +1,18 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
Modified: teem/trunk/tests/ctest/nrrd/sanity.c
===================================================================
--- teem/trunk/tests/ctest/nrrd/sanity.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/sanity.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,20 +1,18 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
Modified: teem/trunk/tests/ctest/nrrd/tbspec.c
===================================================================
--- teem/trunk/tests/ctest/nrrd/tbspec.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/tbspec.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/nrrd.h"
+#include <teem/nrrd.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/nrrd/tload.c
===================================================================
--- teem/trunk/tests/ctest/nrrd/tload.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/tload.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,26 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/nrrd.h"
-#include <testDataPath.h>
+#include <teem/nrrd.h>
+#include <testutil.h>
/*
** Tests:
@@ -41,7 +39,7 @@
nin = nrrdNew();
airMopAdd(mop, nin, (airMopper)nrrdNuke, airMopAlways);
- fullname = testDataPathPrefix("fmob-c4h.nrrd");
+ fullname = teemTestDataPath("fmob-c4h.nrrd");
airMopAdd(mop, fullname, airFree, airMopAlways);
if (nrrdLoad(nin, fullname, NULL)) {
char *err;
@@ -110,7 +108,9 @@
airMopError(mop);
return 1;
}
- if (nrrdSave("tloadTest.nrrd", nin, NULL) || nrrdLoad(ncopy, "tloadTest.nrrd", NULL)
+ char *tmpPath = teemTestTmpPath("tloadTest.nrrd");
+ airMopAdd(mop, tmpPath, airFree, airMopAlways);
+ if (nrrdSave(tmpPath, nin, NULL) || nrrdLoad(ncopy, tmpPath, NULL)
|| nrrdCompare(nin, ncopy, AIR_FALSE /* onlyData */, 0.0 /* epsilon */, &differ,
explain)) {
char *err;
Modified: teem/trunk/tests/ctest/nrrd/trand.c
===================================================================
--- teem/trunk/tests/ctest/nrrd/trand.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/trand.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,26 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/nrrd.h"
-#include <testDataPath.h>
+#include <teem/nrrd.h>
+#include <testutil.h>
/*
** Tests:
@@ -41,17 +39,19 @@
main(int argc, const char *argv[]) {
const char *me;
size_t vi, ii, qvalLen;
- Nrrd *nval, *nhist, *nimg, *nread, *ncorr, *ninmem[3];
+ Nrrd *nval, *nhist, *nimg, *nmine, *ncorr, *ninmem[3];
double aa, bb, *val;
airArray *mop;
- char *name, explain[AIR_STRLEN_LARGE + 1];
+ char explain[AIR_STRLEN_LARGE + 1];
#define VALS 0
#define HIST 1
#define IMAG 2
/* PGM image since this Teem build might not support PNG */
- static const char *const mine[3] = {"vals.nrrd", "histo.nrrd", "histo.pgm"};
- static const char *const corr[3] = {"test/trandvals.nrrd", "test/trandhisto.nrrd",
- "test/trandhisto.pgm"};
+ static const char *const mineFile[3] = {"vals.nrrd", "histo.nrrd", "histo.pgm"};
+ char *minePath[3];
+ static const char *const corrFile[3] = {"test/trandvals.nrrd", "test/trandhisto.nrrd",
+ "test/trandhisto.pgm"};
+ char *corrPath[3];
static const char *const what[3] = {"value", "histogram", "histogram image"};
int differ, wi;
@@ -59,6 +59,15 @@
me = argv[0];
mop = airMopNew();
+ for (unsigned int fidx = 0; fidx < 3; fidx++) {
+ // generate (and mop) string holding path to my tmp files
+ minePath[fidx] = teemTestTmpPath(mineFile[fidx]);
+ airMopAdd(mop, minePath[fidx], airFree, airMopAlways);
+ // generate (and mop) string holding path to correct files to compare with
+ corrPath[fidx] = teemTestDataPath(corrFile[fidx]);
+ airMopAdd(mop, corrPath[fidx], airFree, airMopAlways);
+ }
+
qvalLen = 10 * BINS;
nrrdAlloc_va(nval = nrrdNew(), nrrdTypeDouble, 1, 4 * qvalLen);
airMopAdd(mop, nval, (airMopper)nrrdNuke, airMopAlways);
@@ -68,16 +77,15 @@
airMopAdd(mop, nhist, (airMopper)nrrdNuke, airMopAlways);
nimg = nrrdNew();
airMopAdd(mop, nimg, (airMopper)nrrdNuke, airMopAlways);
- nread = nrrdNew();
- airMopAdd(mop, nread, (airMopper)nrrdNuke, airMopAlways);
+ nmine = nrrdNew();
+ airMopAdd(mop, nmine, (airMopper)nrrdNuke, airMopAlways);
ncorr = nrrdNew();
airMopAdd(mop, ncorr, (airMopper)nrrdNuke, airMopAlways);
airSrandMT(999);
vi = 0;
- /* without first casting to float, the platform-dependent
- differences in the values from airNormalRand() would
- lead to testing errors, e.g.:
+ /* without first casting to float, the platform-dependent differences in the values
+ from airNormalRand() would lead to testing errors, e.g.:
correct (test/trandvals.nrrd) and generated values differ:
valA[0]=0.36654774192269141 < valB[0]=0.36654774192269146 by 5.55112e-17
Would be nice to figure out exactly what the origin of that is ... */
@@ -95,11 +103,11 @@
val[vi++] = AIR_CAST(float, bb);
}
- if (nrrdSave(mine[VALS], nval, NULL)
+ if (nrrdSave(minePath[VALS], nval, NULL)
|| nrrdHisto(nhist, nval, NULL, NULL, BINS, nrrdTypeInt)
- || nrrdSave(mine[HIST], nhist, NULL)
+ || nrrdSave(minePath[HIST], nhist, NULL)
|| nrrdHistoDraw(nimg, nhist, HGHT, AIR_TRUE, 0.0)
- || nrrdSave(mine[IMAG], nimg, NULL)) {
+ || nrrdSave(minePath[IMAG], nimg, NULL)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "%s: trouble:\n%s", me, err);
@@ -107,13 +115,11 @@
return 1;
}
- ninmem[VALS] = nval;
+ ninmem[VALS] = nval; // these were mopped above
ninmem[HIST] = nhist;
ninmem[IMAG] = nimg;
for (wi = 0; wi < 3; wi++) {
- name = testDataPathPrefix(corr[wi]);
- airMopAdd(mop, name, airFree, airMopAlways);
- if (nrrdLoad(ncorr, name, NULL) || nrrdLoad(nread, mine[wi], NULL)) {
+ if (nrrdLoad(nmine, minePath[wi], NULL) || nrrdLoad(ncorr, corrPath[wi], NULL)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "%s: trouble reading %s:\n%s", me, err, what[wi]);
@@ -120,7 +126,7 @@
airMopError(mop);
return 1;
}
- if (nrrdCompare(ninmem[wi], nread, AIR_FALSE /* onlyData */, 0.0 /* epsilon */,
+ if (nrrdCompare(ninmem[wi], nmine, AIR_FALSE /* onlyData */, 0.0 /* epsilon */,
&differ, explain)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
@@ -130,7 +136,7 @@
return 1;
}
if (differ) {
- fprintf(stderr, "%s: in-mem and from-disk (%s) %ss differ: %s\n", me, mine[wi],
+ fprintf(stderr, "%s: in-mem and from-disk (%s) %ss differ: %s\n", me, minePath[wi],
what[wi], explain);
airMopError(mop);
return 1;
@@ -137,7 +143,7 @@
} else {
printf("%s: good: in-mem and from-disk %ss same\n", me, what[wi]);
}
- if (nrrdCompare(ncorr, nread, AIR_FALSE /* onlyData */, 0.0 /* epsilon */, &differ,
+ if (nrrdCompare(ncorr, nmine, AIR_FALSE /* onlyData */, 0.0 /* epsilon */, &differ,
explain)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
@@ -147,8 +153,8 @@
return 1;
}
if (differ) {
- fprintf(stderr, "%s: correct (%s) and generated %ss differ: %s\n", me, corr[wi],
- what[wi], explain);
+ fprintf(stderr, "%s: correct (%s) and generated %ss differ: %s\n", me,
+ corrPath[wi], what[wi], explain);
airMopError(mop);
return 1;
} else {
Modified: teem/trunk/tests/ctest/nrrd/tskip.c
===================================================================
--- teem/trunk/tests/ctest/nrrd/tskip.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/nrrd/tskip.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,25 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/nrrd.h"
+#include <teem/nrrd.h>
+#include <testutil.h>
#define BKEY "tskip"
@@ -49,7 +48,7 @@
Nrrd *nref, *nin;
size_t *size, ii, nn, tick, pad[2];
unsigned int axi, refCRC, gotCRC, sizeNum;
- char *berr, *outS[2], stmp[AIR_STRLEN_SMALL + 1], doneStr[AIR_STRLEN_SMALL + 1];
+ char *berr, *outSbase[2], stmp[AIR_STRLEN_SMALL + 1], doneStr[AIR_STRLEN_SMALL + 1];
airRandMTState *rng;
unsigned int seed, *rdata, printbytes;
unsigned char *dataUC;
@@ -72,7 +71,7 @@
hestOptAdd(&hopt, "pb", "print", airTypeUInt, 1, 1, &printbytes, "0",
"bytes to print at beginning and end of data, to help "
"debug problems");
- hestOptAdd(&hopt, "o", "out.data out.nhdr", airTypeString, 2, 2, outS, NULL,
+ hestOptAdd(&hopt, "o", "out.data out.nhdr", airTypeString, 2, 2, outSbase, NULL,
"output filenames of data and header");
hestParseOrDie(hopt, argc - 1, argv + 1, hparm, me, tskipInfo, AIR_TRUE, AIR_TRUE,
AIR_TRUE);
@@ -123,6 +122,10 @@
refCRC = nrrdCRC32(nref, airEndianBig);
fprintf(stderr, "%u\n", refCRC);
+ char *outS[2];
+ airMopAdd(mop, outS[0] = teemTestTmpPath(outSbase[0]), airFree, airMopAlways);
+ airMopAdd(mop, outS[1] = teemTestTmpPath(outSbase[1]), airFree, airMopAlways);
+
/* write data, with padding */
fprintf(stderr, "saving data . . . ");
fflush(stderr);
Modified: teem/trunk/tests/ctest/unrrdu/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/unrrdu/CMakeLists.txt 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/unrrdu/CMakeLists.txt 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,24 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_unulist unulist.c)
-target_link_libraries(test_unulist teem)
-add_test(NAME unulist COMMAND $<TARGET_FILE:test_unulist>)
+teem_create_test_bin(unrrdu_unulist unulist.c)
+teem_add_test(unrrdu_unulist)
Modified: teem/trunk/tests/ctest/unrrdu/unulist.c
===================================================================
--- teem/trunk/tests/ctest/unrrdu/unulist.c 2025-09-09 04:46:54 UTC (rev 7374)
+++ teem/trunk/tests/ctest/unrrdu/unulist.c 2025-09-09 05:20:55 UTC (rev 7375)
@@ -1,6 +1,6 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2023 University of Chicago
+ Copyright (C) 2009--2025 University of Chicago
Copyright (C) 2005--2008 Gordon Kindlmann
Copyright (C) 1998--2004 University of Utah
@@ -17,10 +17,10 @@
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/unrrdu.h"
+#include <teem/unrrdu.h>
/*
-** Tests:
+** Exercises (not quite testing, yet) unrrduUsageUnu, unrrduCmdList[]->main
*/
int
@@ -40,11 +40,12 @@
hparm = hestParmNew();
airMopAdd(mop, hparm, (airMopper)hestParmFree, airMopAlways);
- /* This just generates all the usage information for unu itself, and then
- for all the unu sub-commands. The purpose is to exercise hest's
- generation of usage info for all the options, and to make sure (by human
- inspection now, later by something automated) that the use of stderr vs
- stdout, and return values, is consistent across all commands */
+ /* This just generates all the usage information for unu itself, and
+ then for all the unu sub-commands. The purpose is to exercise
+ hest's generation of usage info for all the options, and to make
+ sure (by human inspection now, later by something automated) that
+ the use of stderr vs stdout, and return values, is consistent
+ across all commands */
fprintf(out, "%s: ################### BEGIN unu\n", me);
unrrduUsageUnu("unu", hparm, AIR_TRUE /* alsoHidden */);
@@ -52,9 +53,10 @@
uci = 0;
do {
- fprintf(out, "%s: ################### BEGIN unu %s\n", me, unrrduCmdList[uci]->name);
+ fprintf(out, "%s: ################### BEGIN (%u) unu %s\n", me, uci,
+ unrrduCmdList[uci]->name);
ret = unrrduCmdList[uci]->main(0, NULL, unrrduCmdList[uci]->name, hparm);
- fprintf(out, "%s: ################### END unu %s (ret=%d)\n", me,
+ fprintf(out, "%s: ################### END (%u) unu %s (ret=%d)\n", me, uci,
unrrduCmdList[uci]->name, ret);
uci++;
} while (unrrduCmdList[uci]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 04:46:58
|
Revision: 7374
http://sourceforge.net/p/teem/code/7374
Author: kindlmann
Date: 2025-09-09 04:46:54 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
static _hestArgsInResponseFiles should just be named argsInResponseFiles (original name probably predates GLK understanding static at file scope), and, fixing bug that crashed on argv==NULL which can happen for testing
Modified Paths:
--------------
teem/trunk/src/hest/parseHest.c
Modified: teem/trunk/src/hest/parseHest.c
===================================================================
--- teem/trunk/src/hest/parseHest.c 2025-09-09 04:28:57 UTC (rev 7373)
+++ teem/trunk/src/hest/parseHest.c 2025-09-09 04:46:54 UTC (rev 7374)
@@ -25,7 +25,7 @@
#define ME ((parm && parm->verbosity) ? me : "")
/*
-_hestArgsInResponseFiles()
+argsInResponseFiles()
returns the number of "args" (i.e. the number of space-separated strings) that will be
parsed from the response files. The role of this function is solely to simplify the task
@@ -35,10 +35,10 @@
the response files twice. Alas.
*/
static int
-_hestArgsInResponseFiles(int *argsNumP, int *respFileNumP, const char **argv, char *err,
- const hestParm *parm) {
+argsInResponseFiles(int *argsNumP, int *respFileNumP, const char **argv, char *err,
+ const hestParm *parm) {
FILE *file;
- static const char me[] = "_hestArgsInResponseFiles: ";
+ static const char me[] = "argsInResponseFiles: ";
char line[AIR_STRLEN_HUGE + 1], *pound;
int argIdx, len;
@@ -50,12 +50,12 @@
}
argIdx = 0;
- while (argv[argIdx]) {
+ while (argv /* can be NULL for testing */ && argv[argIdx]) {
if (parm->respFileFlag == argv[argIdx][0]) {
/* argv[argIdx] looks like its naming a response file */
/* NOTE: despite the repeated temptation: "-" aka stdin cannot be a response file,
- because it is going to be read in twice: once by _hestArgsInResponseFiles, and
- then again by copyArgv */
+ because it is going to be read in twice: once by argsInResponseFiles, and then
+ again by copyArgv */
if (!(file = fopen(argv[argIdx] + 1, "rb"))) {
/* can't open the indicated response file for reading */
sprintf(err, "%scouldn't open \"%s\" for reading as response file", ME,
@@ -172,7 +172,7 @@
newArgc += 1;
} else {
/* It is a response file. Error checking on open-ability
- should have been done by _hestArgsInResponseFiles() */
+ should have been done by argsInResponseFiles() */
file = fopen(oldArgv[argIdx] + 1, "rb");
/* start line-reading loop */
len = airOneLine(file, line, AIR_STRLEN_HUGE + 1);
@@ -1484,7 +1484,7 @@
by seeing how many args are in the response files, and then adding
on the args from the actual argv (getting this right the first time
greatly simplifies the problem of eliminating memory leaks) */
- if (_hestArgsInResponseFiles(&respArgNum, &respFileNum, _argv, err, PARM)) {
+ if (argsInResponseFiles(&respArgNum, &respFileNum, _argv, err, PARM)) {
airMopError(mop);
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-09 04:29:00
|
Revision: 7373
http://sourceforge.net/p/teem/code/7373
Author: kindlmann
Date: 2025-09-09 04:28:57 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
permit passed oldArgv to NULL; useful for testing
Modified Paths:
--------------
teem/trunk/src/hest/parseHest.c
Modified: teem/trunk/src/hest/parseHest.c
===================================================================
--- teem/trunk/src/hest/parseHest.c 2025-09-08 23:29:06 UTC (rev 7372)
+++ teem/trunk/src/hest/parseHest.c 2025-09-09 04:28:57 UTC (rev 7373)
@@ -140,7 +140,7 @@
/* count number of given ("old") args */
oldArgc = 0;
- while (oldArgv[oldArgc]) {
+ while (oldArgv /* might be NULL for testing */ && oldArgv[oldArgc]) {
oldArgc++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-08 23:29:08
|
Revision: 7372
http://sourceforge.net/p/teem/code/7372
Author: kindlmann
Date: 2025-09-08 23:29:06 +0000 (Mon, 08 Sep 2025)
Log Message:
-----------
may have finally figured out issue with RPATH on repeated make install: just remove old bins and libs before installing them. Testing framework slowly coming back to life; old testDataPath.h.in out of service but remembers contributions
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
teem/trunk/tests/ctest/CMakeLists.txt
teem/trunk/tests/ctest/air/CMakeLists.txt
teem/trunk/tests/ctest/air/amath.c
teem/trunk/tests/ctest/air/miscAir.c
teem/trunk/tests/ctest/air/mtrand.c
teem/trunk/tests/ctest/air/pptest.c
teem/trunk/tests/ctest/air/string.c
teem/trunk/tests/ctest/air/strtok.c
teem/trunk/tests/ctest/testDataPath.h.in
teem/trunk/tests/ctest/testutil.c
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-08 23:29:06 UTC (rev 7372)
@@ -19,7 +19,7 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# Teem/CMakeLists.txt Version 10.92
+# Teem/CMakeLists.txt Version 10.94
# This CMakeLists.txt describes a Teem package that contains:
# (1) a library ("libteem" on unix) and
@@ -33,7 +33,7 @@
# development, but there's no reason to complicate this CMakeLists.txt with describing
# those smaller libraries and their inter-dependencies.
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Project setup: version, metadata, and language
# CMake Version 3.25 came out November 16, 2022
@@ -64,12 +64,12 @@
")
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Include helpers and module paths
# include(CTest) will create the BUILD_TESTING option, turn it ON, hook into CTest, and
# in turn include(CTestConfig.cmake). Most of which is fine, but we want to turn
-# BUILD_TESTING OFF and give a better description
+# BUILD_TESTING OFF by default and give a better description
set(BUILD_TESTING OFF CACHE BOOL "Build Teem's *meagre* ctests")
include(CTest)
@@ -81,7 +81,7 @@
# CMake modules path (for e.g. FindLEVMAR.cmake)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Project options, including choosing dependencies
# - canonical list of optional dependencies
# - option() flags for enabling/disabling them
@@ -124,59 +124,40 @@
option(Teem_BUILD_HEX_UTILS "Build stand-alone raw<-->hex decoder/encoder" OFF)
option(Teem_INSTALL_VERSIONED_PREFIX "Install bin/,lib/,include/ in install/Teem-X.Y.Z subdir" OFF)
-###-----------------------------------------------------------------------------
-# RPATH taming
+###-------------------------------------------------------------------------------------
+# RPATH configuration
-if(UNIX AND NOT APPLE)
- # Linux, BSD, etc.
- if(BUILD_SHARED_LIBS)
- # Executables in bin/ will find libs in ../lib
- set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
+# Earlier versions of this tried to do clever things so that "make install; make install"
+# would not generate errors (on Mac) like:
+# install_name_tool: for: <bin> (for architecture arm64) option
+# "-add_rpath @loader_path/../lib" would duplicate path, file already has LC_RPATH ...
+# But it is just too fussy and becomes too complicated. So instead, see comment later
+# below about "clean out old installed RPATH-aware files" in installdir/{bin,lib}:
+# we just erase those files first as part of "make install"
- # Let CMake add additional transitive dependency paths
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
- # Separate build-tree vs install-tree RPATHs
- set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-
- set(CMAKE_SKIP_BUILD_RPATH FALSE)
- set(CMAKE_SKIP_INSTALL_RPATH FALSE)
- else()
- # Static build: no RPATH needed
- set(CMAKE_SKIP_BUILD_RPATH TRUE)
- set(CMAKE_SKIP_INSTALL_RPATH TRUE)
+if(BUILD_SHARED_LIBS)
+ # set(CMAKE_SKIP_RPATH FALSE) # "This is the default unless you explicitly set it TRUE somewhere else. You can drop it"
+ if(APPLE)
+ # Enable MacOS RPATH support
+ set(CMAKE_MACOSX_RPATH ON)
endif()
-elseif(APPLE)
- set(CMAKE_MACOSX_RPATH ON)
- if(BUILD_SHARED_LIBS)
- # Build artifacts already contain the desired *install* RPATH,
- # so the install step won't need to patch anything.
- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
- # For Teem’s own executables (in bin) to find Teem’s dylibs (in lib)
- # in the *installed* tree. In the Teem build tree this usually also works
- # because the relative layout is the same.
- # HEY build bin fail, but install bin ok + ok post mv installdir
+ # - - - - - - - - - - - - -
+ # Install-tree settings
+ #
+ # Executables and libraries after 'make install' should be relocatable:
+ # - libraries go in install/lib
+ # - tools in install/bin use @loader_path/../lib (Mac) or $ORIGIN/../lib (Linux)
+ set(CMAKE_SKIP_INSTALL_RPATH FALSE)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) # Avoid adding system paths
+ if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/../lib")
- # With this, both build bin works and install bin works, but can't move installdir
- #set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
- # Make the install step idempotent: do not try to re-edit LC_RPATH.
- # set(CMAKE_SKIP_INSTALL_RPATH TRUE) # HEY with this, nothing has an RPATH!
- set(CMAKE_SKIP_INSTALL_RPATH FALSE)
-
- # Do not strip build-tree RPATH (we’re *using* the install rpath in the build tree)
- set(CMAKE_SKIP_BUILD_RPATH FALSE)
-
- else()
- # Static build: no RPATH needed
- set(CMAKE_SKIP_BUILD_RPATH TRUE)
- set(CMAKE_SKIP_INSTALL_RPATH TRUE)
+ elseif(UNIX)
+ set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
endif()
endif()
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Dependency discovery
# - normalize names/targets/FOUND vars
# - run find_package() for requested DEPs
@@ -232,7 +213,7 @@
#get_target_property(_png_libs PNG::PNG INTERFACE_LINK_LIBRARIES)
#message(STATUS "PNG::PNG links to: ${_png_libs}")
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Describe install directory layout with variables:
# HEADERS_INSTALL_DIR, LIB_INSTALL_DIR, BIN_INSTALL_DIR, CONFIG_INSTALL_DIR
# which are paths to the different things relative to the install prefix
@@ -254,7 +235,7 @@
# so that BIN_INSTALL_DIR can be seen by src/bin/CMakeLists.txt
set(BIN_INSTALL_DIR "${BIN_INSTALL_DIR}" CACHE INTERNAL "Install dir for binaries")
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Configure-time test: does AIR_EXISTS() work like isfinite()?
# A lot of work for one little macro (which GLK started using before the functionally
@@ -355,8 +336,8 @@
endif()
# AIR_EXISTS_MACRO_FAILS is used indirectly, below, by configure_file(airExistsConf.h)
-###-----------------------------------------------------------------------------
-# Describe the Teem library
+###-------------------------------------------------------------------------------------
+# Describe the (monolithic) Teem library
add_library(Teem "")
@@ -442,8 +423,8 @@
POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
)
-###-----------------------------------------------------------------------------
-# Collect sources from Teem's component libraries
+###-------------------------------------------------------------------------------------
+# Collect sources from Teem's component libraries (to make single Teem library)
# Each component library will append its public headers to global property
# "Teem_HEADER_FILES". For clarity, we initialize it to empty string now.
@@ -517,7 +498,7 @@
message(STATUS "Teem INTERFACE_COMPILE_DEFINITIONS: ${teem_inter_compdefs}")
endif()
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Declare Teem's public headers
# Set *variable* _Teem_headers from previously set *property* Teem_HEADER_FILES
@@ -562,12 +543,37 @@
FILES ${_Teem_headers_full} # the list of header files
)
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Describe Teem's command-line executables (e.g. "unu")
+# Only on Mac with shared libraries: clean out old installed RPATH-aware files before
+# installing new ones, because getting the RPATH stuff to be set correctly after the
+# first "make install", but *not* modified after a second "make install", is just too
+# annoying to figure out. This hack has to *precede* any other install() commands, which
+# is why this shows up here, before src/bin/CMakeLists.txt's teem_add_executable() can
+# call install()
+if(BUILD_SHARED_LIBS)
+ if(APPLE)
+ install(CODE "
+ file(GLOB old_bins \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/*\")
+ file(GLOB old_libs \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/*\")
+ if(old_bins OR old_libs)
+ message(STATUS \"Removing prior \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/{bin,lib}/* rather than attempt RPATH surgery\")
+ endif()
+ if(old_bins)
+ file(REMOVE \${old_bins})
+ endif()
+ if(old_libs)
+ file(REMOVE \${old_libs})
+ endif()
+ ")
+ endif()
+endif()
+
+# Describe all the command-line tools (unu and friends)
add_subdirectory(src/bin)
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Optional helper tools (hex/dehex)
# If requested, helper dehex/exhex programs
@@ -575,7 +581,7 @@
add_subdirectory(src/hex)
endif()
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Testing via CTest
# Note: these tests are very incomplete. It is unclear how much of Teem's future
# development will hinge on CTest-based testing, now that the Python/CFFI bindings
@@ -585,7 +591,7 @@
add_subdirectory(tests/ctest)
endif()
-###-----------------------------------------------------------------------------
+###-------------------------------------------------------------------------------------
# Install rules
# Declare how Teem should be installed, and hang all this off the "TeemTargets" export
@@ -601,14 +607,14 @@
include(CMakePackageConfigHelpers)
-# Generate TeemConfig.cmake from template CMake/TeemConfig.cmake.in
+# Generate TeemConfig.cmake from template CMake/TeemConfig.cmake.in.
# We have to do some work to teach Teem to pull in its own dependencies.
-# First build up list of find_dependency() calls for TeemConfig.cmake:
+# First, build up list of find_dependency() calls for TeemConfig.cmake:
set(_Teem_find_deps "")
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_USE_${_tdep})
if(NOT _Teem_find_deps)
- # before first dependency we have to say what find_dependency() means
+ # before first dependency, we have to say how to find_dependency()
string(APPEND _Teem_find_deps "include(CMakeFindDependencyMacro)\n")
endif()
# Map to CMake package name
Modified: teem/trunk/tests/ctest/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/CMakeLists.txt 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/CMakeLists.txt 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,68 +1,111 @@
+# tests/ctest/CMakeLists.txt: Test driver for Teem's CTest-based tests
+# Copyright (C) 2025 University of Chicago
+# See ../../LICENSE.txt for licensing terms
#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+# Note: these tests are very incomplete. It is unclear how much of Teem's future
+# development will hinge on CTest-based testing, now that the Python/CFFI bindings
+# offer a more convenient way to call into Teem. But to use them (from top-level):
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
+# # for running tests locally
+# cmake -S . -B <builddir> -DBUILD_TESTING=ON
+# cmake --build <builddir>
+# cd <builddir>
+# ctest # run all tests
+# ctest -V # verbose
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
+# # for submitting dashboard
+# cd build
+# ctest -D Nightly # or Experimental, Continuous
+
+###-------------------------------------------------------------------------------------
+# Basic set-up
+
+message(STATUS "Setting up testing")
+
+# Make sure tests can see headers generated by the build system
+include_directories(${CMAKE_BINARY_DIR}/include)
+
+# Create a small *static* "testutil" library from testutil.{c,h}
+add_library(teem_testutil STATIC testutil.c)
+target_include_directories(teem_testutil PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+target_link_libraries(teem_testutil PRIVATE Teem)
+
+###-------------------------------------------------------------------------------------
+# Two helper functions for creating and describing tests:
+# teem_create_test_executable: creates the executable test program
+# teem_add_test: uses the executable to declare a new test
+
+# teem_create_test_executable(<target> <src> [USE_TMPDIR]):
+# From test program source file <src> create executable, hereafter referred to as
+# <target>. If USE_TMPDIR, then create a tmp directory "<target>_tmp" that the test can
+# use for writing files. Attach the necessary environment variables to the target, to be
+# re-used by teem_add_test. It makes more sense to "attach" the tmp dir to the target
+# than to the test, because needing and using tmp dir is more directly a consequence of
+# the source code of the test program, than the circumstances of how the test executable
+# is run.
#
+function(teem_create_test_executable target src)
+ set(options USE_TMPDIR)
+ # this sets TCTE_USE_TMPDIR if "USE_TMPDIR" was passed
+ cmake_parse_arguments(TCTE "${options}" "" "" ${ARGN})
-project(TEEMTesting)
+ add_executable(${target} ${src})
+ target_link_libraries(${target} PRIVATE Teem teem_testutil)
-# Create a header file with the path to the data in it. Note that we don't
-# have to make these paths "windows friendly" as it turns out windows can read
-# forward slashed paths.
-set(TESTING_DATA_PATH "${CMAKE_SOURCE_DIR}/data" CACHE PATH
- "Path to testing data")
-mark_as_advanced(TESTING_DATA_PATH)
+ # Always store the data dir for later
+ set_property(TARGET ${target} PROPERTY TEEM_TEST_DATA_DIR "${CMAKE_SOURCE_DIR}/data")
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/testDataPath.h.in"
- "${CMAKE_BINARY_DIR}/include/testDataPath.h"
+ # Optionally create a tmpdir and remember it
+ if(TCTE_USE_TMPDIR)
+ set(tmpdir "${CMAKE_CURRENT_BINARY_DIR}/${target}_tmp")
+ file(MAKE_DIRECTORY "${tmpdir}")
+ set_property(TARGET ${target} PROPERTY TEEM_TEST_TMP_DIR "${tmpdir}")
+ endif()
+endfunction()
+
+# teem_add_test(<target> [NAME <name>] [ARGS <args>...])
+# This creates the CTest test via add_test() around the <target> created by
+# teem_create_test_executable above. The NAME option, if used, creates a name for the
+# test different than ${target} The ARGS option says how to run it on the command-line.
+#
+function(teem_add_test target)
+ set(options) # no boolean options to parse
+ set(oneValueArgs NAME)
+ set(multiValueArgs ARGS)
+ # this sets TAT_NAME to argument after "NAME" (if any),
+ # and TAT_ARGS to list of args after "ARGS" (if any).
+ cmake_parse_arguments(TAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ if(NOT TARGET ${target})
+ message(FATAL_ERROR "teem_add_test: target ${target} not found")
+ endif()
+
+ # Compute test name
+ if(TAT_NAME)
+ set(test_name "${TAT_NAME}")
+ else()
+ set(test_name "${target}")
+ endif()
+
+ # Get stored metadata from the target
+ get_property(data_dir TARGET ${target} PROPERTY TEEM_TEST_DATA_DIR)
+ get_property(tmp_dir TARGET ${target} PROPERTY TEEM_TEST_TMP_DIR)
+
+ # Build up environment string
+ set(env_list "TEEM_TEST_DATA_DIR=${data_dir}")
+ if(tmp_dir)
+ list(APPEND env_list "TEEM_TEST_TMP_DIR=${tmp_dir}")
+ endif()
+
+ # Register the test
+ add_test(NAME ${test_name} COMMAND ${target} ${TAT_ARGS})
+ set_tests_properties(${test_name} PROPERTIES
+ ENVIRONMENT "${env_list}"
)
+endfunction()
-# nrrdSanity the executable is no longer (as of Teem v2) built;
-# so this is being removed. Lots of tests will immediately fail
-# if nrrdSanity() (the function) fails.
-## This just runs nrrdSanity as test called "nrrd.Sanity"
-## We don't do the same for airSanity because that's an
-## "experimental app" . . .
-# add_test(NAME nrrd.Sanity COMMAND $<TARGET_FILE:nrrdSanity>)
-
-# Hope to eventually have tests in all directories; until then
-# many of these are commented out. (TEEM_LIB_LIST)
+###-------------------------------------------------------------------------------------
+# The Tests!
+#
+# These are the component libraries that have tests; more added as time permits
add_subdirectory(air)
-# add_subdirectory(hest)
-add_subdirectory(biff)
-add_subdirectory(nrrd)
-# add_subdirectory(ell)
-# add_subdirectory(moss)
-add_subdirectory(unrrdu)
-# add_subdirectory(alan)
-# add_subdirectory(tijk)
-add_subdirectory(gage)
-# add_subdirectory(dye)
-# add_subdirectory(bane)
-# add_subdirectory(limn)
-# add_subdirectory(echo)
-# add_subdirectory(hoover)
-# add_subdirectory(seek)
-add_subdirectory(ten)
-# add_subdirectory(elf)
-# add_subdirectory(pull)
-# add_subdirectory(coil)
-# add_subdirectory(push)
-# add_subdirectory(mite)
-add_subdirectory(meet)
Modified: teem/trunk/tests/ctest/air/CMakeLists.txt
===================================================================
--- teem/trunk/tests/ctest/air/CMakeLists.txt 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/CMakeLists.txt 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,44 +1,18 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-add_executable(test_miscAir miscAir.c)
-target_link_libraries(test_miscAir teem)
-add_test(NAME misc COMMAND $<TARGET_FILE:test_miscAir>)
+teem_create_test_executable(test_miscAir miscAir.c)
+teem_add_test(test_miscAir)
-add_executable(test_mtrand mtrand.c)
-target_link_libraries(test_mtrand teem)
-add_test(NAME mtrand COMMAND $<TARGET_FILE:test_mtrand>)
+teem_create_test_executable(test_mtrand mtrand.c)
+teem_add_test(test_mtrand)
-add_executable(test_amath amath.c)
-target_link_libraries(test_amath teem)
-add_test(NAME amath COMMAND $<TARGET_FILE:test_amath>)
+teem_create_test_executable(test_amath amath.c)
+teem_add_test(test_amath)
-add_executable(test_string string.c)
-target_link_libraries(test_string teem)
-add_test(NAME string COMMAND $<TARGET_FILE:test_string>)
+teem_create_test_executable(test_string string.c)
+teem_add_test(test_string)
-add_executable(test_strtok strtok.c)
-target_link_libraries(test_strtok teem)
-add_test(NAME strtok COMMAND $<TARGET_FILE:test_strtok>)
+teem_create_test_executable(test_strtok strtok.c)
+teem_add_test(test_strtok)
-add_executable(test_pptest pptest.c)
-target_link_libraries(test_pptest teem)
-add_test(NAME pptest COMMAND $<TARGET_FILE:test_pptest>)
+teem_create_test_executable(test_pptest pptest.c)
+teem_add_test(test_pptest)
Modified: teem/trunk/tests/ctest/air/amath.c
===================================================================
--- teem/trunk/tests/ctest/air/amath.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/amath.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/air.h"
+#include <teem/air.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/air/miscAir.c
===================================================================
--- teem/trunk/tests/ctest/air/miscAir.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/miscAir.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/air.h"
+#include <teem/air.h>
/*
** to test:
Modified: teem/trunk/tests/ctest/air/mtrand.c
===================================================================
--- teem/trunk/tests/ctest/air/mtrand.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/mtrand.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,27 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
+#include <teem/air.h>
-#include "teem/air.h"
-
/*
** Tests:
** airRandMTStateNew
@@ -39,28 +36,27 @@
airArray *mop;
airRandMTState *rng;
const char *me;
- unsigned int rval[NUM][NUM] = {
- {2357136044u, 2546248239u, 3071714933u, 3626093760u, 2588848963u,
- 3684848379u, 2340255427u, 3638918503u, 1819583497u, 2678185683u},
- {1608637542u, 3421126067u, 4083286876u, 787846414u, 3143890026u,
- 3348747335u, 2571218620u, 2563451924u, 670094950u, 1914837113u},
- {197744554u, 2405527281u, 1590178649u, 2055114040u, 1040749045u,
- 1355459964u, 2699301070u, 1591340141u, 4252490304u, 3121394926u},
- {451710822u, 4140706415u, 550374602u, 880776961u, 375407235u,
- 576831824u, 495976644u, 1350392909u, 3211465673u, 1227650870u},
- {2567526101u, 397661439u, 2237017401u, 316000557u, 1060138423u,
- 2802111455u, 1449535759u, 751581949u, 3635455645u, 658021748u},
- {429171210u, 2009581671u, 1300722668u, 3858470021u, 3363216262u,
- 1963629412u, 2166299591u, 229689286u, 484002369u, 2062223911u},
- {23250075u, 3670330222u, 1860540774u, 4216169317u, 1062279565u,
- 2886996639u, 2197431119u, 3112004045u, 3229777453u, 1632140913u},
- {2869147098u, 1558248213u, 585501645u, 3600180646u, 2654279825u,
- 3658135664u, 287832047u, 912891514u, 2926707351u, 937957965u},
- {1891499427u, 1885608988u, 3850740167u, 3832766153u, 2073041664u,
- 3289176644u, 989474400u, 2841420218u, 4096852366u, 1816963771u},
- {2552602868u, 2086504389u, 219288614u, 3347214808u, 215326247u,
- 3609464630u, 3506494207u, 997691580u, 1726903302u, 3302470737u}
- };
+ unsigned int rval[NUM][NUM]
+ = {{2357136044u, 2546248239u, 3071714933u, 3626093760u, 2588848963u, 3684848379u,
+ 2340255427u, 3638918503u, 1819583497u, 2678185683u},
+ {1608637542u, 3421126067u, 4083286876u, 787846414u, 3143890026u, 3348747335u,
+ 2571218620u, 2563451924u, 670094950u, 1914837113u},
+ {197744554u, 2405527281u, 1590178649u, 2055114040u, 1040749045u, 1355459964u,
+ 2699301070u, 1591340141u, 4252490304u, 3121394926u},
+ {451710822u, 4140706415u, 550374602u, 880776961u, 375407235u, 576831824u,
+ 495976644u, 1350392909u, 3211465673u, 1227650870u},
+ {2567526101u, 397661439u, 2237017401u, 316000557u, 1060138423u, 2802111455u,
+ 1449535759u, 751581949u, 3635455645u, 658021748u},
+ {429171210u, 2009581671u, 1300722668u, 3858470021u, 3363216262u, 1963629412u,
+ 2166299591u, 229689286u, 484002369u, 2062223911u},
+ {23250075u, 3670330222u, 1860540774u, 4216169317u, 1062279565u, 2886996639u,
+ 2197431119u, 3112004045u, 3229777453u, 1632140913u},
+ {2869147098u, 1558248213u, 585501645u, 3600180646u, 2654279825u, 3658135664u,
+ 287832047u, 912891514u, 2926707351u, 937957965u},
+ {1891499427u, 1885608988u, 3850740167u, 3832766153u, 2073041664u, 3289176644u,
+ 989474400u, 2841420218u, 4096852366u, 1816963771u},
+ {2552602868u, 2086504389u, 219288614u, 3347214808u, 215326247u, 3609464630u,
+ 3506494207u, 997691580u, 1726903302u, 3302470737u}};
unsigned int ii, jj, rr;
AIR_UNUSED(argc);
@@ -69,13 +65,12 @@
mop = airMopNew();
rng = airRandMTStateNew(0);
airMopAdd(mop, rng, (airMopper)airRandMTStateNix, airMopAlways);
- for (jj=0; jj<NUM; jj++) {
- airSrandMT_r(rng, 42*jj);
- for (ii=0; ii<NUM; ii++) {
+ for (jj = 0; jj < NUM; jj++) {
+ airSrandMT_r(rng, 42 * jj);
+ for (ii = 0; ii < NUM; ii++) {
rr = airUIrandMT_r(rng);
if (rval[jj][ii] != rr) {
- fprintf(stderr, "%s: rval[%u][%u] %u != %u\n",
- me, jj, ii, rval[jj][ii], rr);
+ fprintf(stderr, "%s: rval[%u][%u] %u != %u\n", me, jj, ii, rval[jj][ii], rr);
airMopError(mop);
exit(1);
}
@@ -85,6 +80,3 @@
airMopOkay(mop);
exit(0);
}
-
-
-
Modified: teem/trunk/tests/ctest/air/pptest.c
===================================================================
--- teem/trunk/tests/ctest/air/pptest.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/pptest.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/air.h"
+#include <teem/air.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/air/string.c
===================================================================
--- teem/trunk/tests/ctest/air/string.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/string.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,27 +1,24 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
+#include <teem/air.h>
-#include "teem/air.h"
-
/*
** Tests:
** airStrlen
@@ -33,13 +30,23 @@
*/
/* random test strings */
-#define STR_A1 "The facts of life: To make an alteration in the evolvement of an organic life system is fatal. A coding sequence cannot be revised once it's been established."
-#define STR_A2 "Because by the second day of incubation, any cells that have undergone reversion mutations give rise to revertant colonies like rats leaving a sinking ship; then the ship sinks."
+#define STR_A1 \
+ "The facts of life: To make an alteration in the evolvement of an organic life " \
+ "system is fatal. A coding sequence cannot be revised once it's been established."
+#define STR_A2 \
+ "Because by the second day of incubation, any cells that have undergone reversion " \
+ "mutations give rise to revertant colonies like rats leaving a sinking ship; then " \
+ "the ship sinks."
#define STR_A (STR_A1 " " STR_A2)
-
-#define STR_B1 "We've already tried it. Ethyl methane sulfonate is an alkylating agent and a potent mutagen. It created a virus so lethal the subject was dead before he left the table."
-#define STR_B2 "Wouldn't obstruct replication, but it does give rise to an error in replication so that the newly formed DNA strand carries a mutation and you've got a virus again. But this - all of this is academic. You were made as well as we could make you."
+#define STR_B1 \
+ "We've already tried it. Ethyl methane sulfonate is an alkylating agent and a " \
+ "potent mutagen. It created a virus so lethal the subject was dead before he left " \
+ "the table."
+#define STR_B2 \
+ "Wouldn't obstruct replication, but it does give rise to an error in replication so " \
+ "that the newly formed DNA strand carries a mutation and you've got a virus again. " \
+ "But this - all of this is academic. You were made as well as we could make you."
#define STR_B (STR_B1 " " STR_B2)
#define STR_AB (STR_A " " STR_B)
@@ -86,12 +93,11 @@
aa = airStrdup(STR_A);
airMopAdd(mop, aa, airFree, airMopAlways);
if (strcmp(aa, STR_A)) {
- fprintf(stderr, "%s: airStrdup failure: |%s| != |%s|\n", me,
- aa, STR_A);
+ fprintf(stderr, "%s: airStrdup failure: |%s| != |%s|\n", me, aa, STR_A);
airMopError(mop);
exit(1);
}
- aaSize = strlen(aa)+1;
+ aaSize = strlen(aa) + 1;
aaCopy = AIR_CALLOC(aaSize, char);
airMopAdd(mop, aaCopy, airFree, airMopAlways);
@@ -100,13 +106,12 @@
airMopAdd(mop, ab, airFree, airMopAlways);
sprintf(ab, "%s %s", STR_A, STR_B);
-#define TEST(COPY, COMP) \
- airStrcpy(aaCopy, aaSize, COPY); \
- if (strcmp(aaCopy, COMP)) { \
- fprintf(stderr, "%s: airStrcpy failure: |%s| != |%s|\n", \
- me, aaCopy, COMP); \
- airMopError(mop); \
- exit(1); \
+#define TEST(COPY, COMP) \
+ airStrcpy(aaCopy, aaSize, COPY); \
+ if (strcmp(aaCopy, COMP)) { \
+ fprintf(stderr, "%s: airStrcpy failure: |%s| != |%s|\n", me, aaCopy, COMP); \
+ airMopError(mop); \
+ exit(1); \
}
/* different args (to copy) to airStrcpy */
Modified: teem/trunk/tests/ctest/air/strtok.c
===================================================================
--- teem/trunk/tests/ctest/air/strtok.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/air/strtok.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -1,25 +1,23 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+ Copyright (C) 2009--2025 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
-#include "teem/air.h"
+#include <teem/air.h>
/*
** Tests:
Modified: teem/trunk/tests/ctest/testDataPath.h.in
===================================================================
--- teem/trunk/tests/ctest/testDataPath.h.in 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/testDataPath.h.in 2025-09-08 23:29:06 UTC (rev 7372)
@@ -26,6 +26,15 @@
#include <string.h>
#include <teem/air.h>
+// #warning only became standard in C23:
+// https://en.cppreference.com/w/c/preprocessor/warning.html
+#warning "With the new Teem v2 testing framework, this file is not needed anymore;"
+#warning "the location of data is now communicated at run-time via environment"
+#warning "variables, rather than at configure- and compile-time via a header file."
+#warning "But the file is sticking around for now out of gratitude to James Bigler"
+#warning "who first got this working :)"
+#error "testDataPath.h no longer used"
+
/*
** testDataPathPrefix allocates and returns a string which is
** the given "base" prefixed with the path to the test datasets,
Modified: teem/trunk/tests/ctest/testutil.c
===================================================================
--- teem/trunk/tests/ctest/testutil.c 2025-09-08 17:37:13 UTC (rev 7371)
+++ teem/trunk/tests/ctest/testutil.c 2025-09-08 23:29:06 UTC (rev 7372)
@@ -9,6 +9,11 @@
#include "testutil.h"
+/* Names of the environment variables that communicate the data and tmp directories.
+ HEY: have to keep in sync with CMakeLists.txt in this same directory */
+#define DATA_DIR_ENVVAR "TEEM_TEST_DATA_DIR"
+#define TMP_DIR_ENVVAR "TEEM_TEST_TMP_DIR"
+
// prependEnvVar(envVar, fName) returns a *newly-allocated* string concatenating
// the value of environment variable `envVar`, '/', and `fName`
static char *
@@ -45,13 +50,13 @@
// for test data filename `fName`, this returns a new-allocated path to it
char *
teemTestDataPath(const char *fName) {
- return prependEnvVar("TEEM_TEST_DATA_DIR", fName);
+ return prependEnvVar(DATA_DIR_ENVVAR, fName);
}
// for temporary file name `fName`, this returns a new-allocated path to it
char *
teemTestTmpPath(const char *fName) {
- return prependEnvVar("TEEM_TEST_TMP_DIR", fName);
+ return prependEnvVar(TMP_DIR_ENVVAR, fName);
}
/* (for testing)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-08 17:37:15
|
Revision: 7371
http://sourceforge.net/p/teem/code/7371
Author: kindlmann
Date: 2025-09-08 17:37:13 +0000 (Mon, 08 Sep 2025)
Log Message:
-----------
for new testing framework
Added Paths:
-----------
teem/trunk/tests/ctest/testutil.c
teem/trunk/tests/ctest/testutil.h
Added: teem/trunk/tests/ctest/testutil.c
===================================================================
--- teem/trunk/tests/ctest/testutil.c (rev 0)
+++ teem/trunk/tests/ctest/testutil.c 2025-09-08 17:37:13 UTC (rev 7371)
@@ -0,0 +1,74 @@
+/* testutil: minimal testing library functions for Teem
+ Copyright (C) 2025 University of Chicago
+ See ../../LICENSE.txt for licensing terms */
+
+#include <stdlib.h> /* for getenv, malloc */
+#include <string.h> /* for strlen */
+#include <stdio.h> /* for fprintf */
+#include <assert.h> /* for assert */
+
+#include "testutil.h"
+
+// prependEnvVar(envVar, fName) returns a *newly-allocated* string concatenating
+// the value of environment variable `envVar`, '/', and `fName`
+static char *
+prependEnvVar(const char *envVar, const char *fName) {
+ if (!(envVar && strlen(envVar) && fName && strlen(fName))) {
+ fprintf(stderr, "%s: ERROR: got NULL (or empty) envvar or file name\n", __func__);
+ return NULL;
+ }
+ const char *evStr = getenv(envVar);
+ if (!evStr) {
+ fprintf(stderr,
+ "%s: ERROR: environment variable \"%s\" not set\n",
+ __func__,
+ envVar);
+ return NULL;
+ }
+ size_t evLen = strlen(evStr);
+ if (!evLen) {
+ fprintf(stderr,
+ "%s: ERROR: environment variable \"%s\" set to empty string\n",
+ __func__,
+ envVar);
+ return NULL;
+ }
+ size_t fNameLen = strlen(fName);
+ char *ret = malloc(evLen + strlen("/") + fNameLen + 1);
+ assert(ret);
+ strcpy(ret, evStr);
+ ret[evLen] = '/';
+ strcpy(ret + evLen + 1, fName);
+ return ret;
+}
+
+// for test data filename `fName`, this returns a new-allocated path to it
+char *
+teemTestDataPath(const char *fName) {
+ return prependEnvVar("TEEM_TEST_DATA_DIR", fName);
+}
+
+// for temporary file name `fName`, this returns a new-allocated path to it
+char *
+teemTestTmpPath(const char *fName) {
+ return prependEnvVar("TEEM_TEST_TMP_DIR", fName);
+}
+
+/* (for testing)
+int
+main(int argc, const char *argv[]) {
+ if (argc == 2) {
+ char *ret = teemTestDataPath(argv[1]);
+ if (ret) {
+ printf("teemTestDataPath: |%s|\n", ret);
+ free(ret);
+ }
+ ret = teemTestTmpPath(argv[1]);
+ if (ret) {
+ printf("teemTestTmpPath: |%s|\n", ret);
+ free(ret);
+ }
+ }
+ return 0;
+}
+*/
Added: teem/trunk/tests/ctest/testutil.h
===================================================================
--- teem/trunk/tests/ctest/testutil.h (rev 0)
+++ teem/trunk/tests/ctest/testutil.h 2025-09-08 17:37:13 UTC (rev 7371)
@@ -0,0 +1,19 @@
+/* testutil: minimal testing library functions for Teem
+ Copyright (C) 2025 University of Chicago
+ See ../../LICENSE.txt for licensing terms */
+
+#ifndef TEEM_TESTUTIL_H
+#define TEEM_TESTUTIL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern char *teemTestDataPath(const char *fName);
+extern char *teemTestTmpPath(const char *fName);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 16:53:09
|
Revision: 7370
http://sourceforge.net/p/teem/code/7370
Author: kindlmann
Date: 2025-09-06 16:53:07 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
some variable renaming as part of debugging unu make, flagging where in make.c to crank up verbosity
Modified Paths:
--------------
teem/trunk/src/hest/parseHest.c
teem/trunk/src/unrrdu/make.c
Modified: teem/trunk/src/hest/parseHest.c
===================================================================
--- teem/trunk/src/hest/parseHest.c 2025-09-06 16:44:50 UTC (rev 7369)
+++ teem/trunk/src/hest/parseHest.c 2025-09-06 16:53:07 UTC (rev 7370)
@@ -35,47 +35,52 @@
the response files twice. Alas.
*/
static int
-_hestArgsInResponseFiles(int *argcP, int *nrfP, const char **argv, char *err,
+_hestArgsInResponseFiles(int *argsNumP, int *respFileNumP, const char **argv, char *err,
const hestParm *parm) {
FILE *file;
static const char me[] = "_hestArgsInResponseFiles: ";
char line[AIR_STRLEN_HUGE + 1], *pound;
- int ai, len;
+ int argIdx, len;
- *argcP = 0;
- *nrfP = 0;
+ *argsNumP = 0;
+ *respFileNumP = 0;
if (!parm->respFileEnable) {
/* don't do response files; we're done */
return 0;
}
- ai = 0;
- while (argv[ai]) {
- if (parm->respFileFlag == argv[ai][0]) {
+ argIdx = 0;
+ while (argv[argIdx]) {
+ if (parm->respFileFlag == argv[argIdx][0]) {
+ /* argv[argIdx] looks like its naming a response file */
/* NOTE: despite the repeated temptation: "-" aka stdin cannot be a response file,
because it is going to be read in twice: once by _hestArgsInResponseFiles, and
then again by copyArgv */
- if (!(file = fopen(argv[ai] + 1, "rb"))) {
+ if (!(file = fopen(argv[argIdx] + 1, "rb"))) {
/* can't open the indicated response file for reading */
sprintf(err, "%scouldn't open \"%s\" for reading as response file", ME,
- argv[ai] + 1);
- *argcP = 0;
- *nrfP = 0;
+ argv[argIdx] + 1);
+ *argsNumP = 0;
+ *respFileNumP = 0;
return 1;
}
+ /* read first line, and start looping over lines */
len = airOneLine(file, line, AIR_STRLEN_HUGE + 1);
while (len > 0) {
+ /* first # (or #-alike char) is turned into line end */
if ((pound = strchr(line, parm->respFileComment))) {
*pound = '\0';
}
+ /* count words in line */
airOneLinify(line);
- *argcP += airStrntok(line, AIR_WHITESPACE);
+ *argsNumP += airStrntok(line, AIR_WHITESPACE);
+ /* read next line for next iter */
len = airOneLine(file, line, AIR_STRLEN_HUGE + 1);
}
fclose(file); /* ok because file != stdin, see above */
- (*nrfP)++;
+ (*respFileNumP)++;
}
- ai++;
+ argIdx++;
}
return 0;
}
@@ -116,10 +121,9 @@
But hestParse does not know or care about "operands": *every* element of the given argv
will be interpreted as the argument to some option, including an unflagged option (a
variable unflagged option is how hest would support something like "cksum *.txt"). For
-hest to implement the expected behavior for
-"--", hest has to care about "--" only in the context of collecting parameters to
-*flagged* options. But copyArgv() is upstream of that awareness (of flagged vs
-unflagged), so we do not act on "--" here.
+hest to implement the expected behavior for "--", hest has to care about "--" only in the
+context of collecting parameters to *flagged* options. But copyArgv() is upstream of that
+awareness (of flagged vs unflagged), so we do not act on "--" here.
Note that there are lots of ways that hest does NOT conform to these POSIX guidelines
(such as: currently single-character flags cannot be grouped together, and options can
@@ -131,33 +135,49 @@
airArray *pmop) {
static const char me[] = "copyArgv";
char line[AIR_STRLEN_HUGE + 1], *pound;
- int len, newArgc, oldArgc, incr, ai;
+ unsigned int len, newArgc, oldArgc, incr, argIdx;
FILE *file;
- newArgc = oldArgc = 0;
+ /* count number of given ("old") args */
+ oldArgc = 0;
+ while (oldArgv[oldArgc]) {
+ oldArgc++;
+ }
+
+ if (parm->verbosity > 1) {
+ printf("%s: hello, oldArgc (number of input args) = %u:\n", me, oldArgc);
+ for (argIdx = 0; argIdx < oldArgc; argIdx++) {
+ printf(" oldArgv[%u] == |%s|\n", argIdx, oldArgv[argIdx]);
+ }
+ }
+
+ newArgc = 0;
*sawHelp = AIR_FALSE;
- while (oldArgv[oldArgc]) {
- if (parm->respectDashDashHelp && !strcmp("--help", oldArgv[oldArgc])) {
+ for (argIdx = 0; argIdx < oldArgc; argIdx++) {
+ if (parm->respectDashDashHelp && !strcmp("--help", oldArgv[argIdx])) {
*sawHelp = AIR_TRUE;
break;
}
/* else not a show-stopper argument */
if (parm->verbosity) {
- printf("%s:________ newArgc = %d, oldArgc = %d -> \"%s\"\n", me, newArgc, oldArgc,
- oldArgv[oldArgc]);
+ printf("%s:________ newArgc = %u, argIdx = %u -> \"%s\"\n", me, newArgc, argIdx,
+ oldArgv[argIdx]);
printArgv(newArgc, newArgv, " ");
}
- if (!parm->respFileEnable || parm->respFileFlag != oldArgv[oldArgc][0]) {
- /* nothing to do with a response file */
- newArgv[newArgc] = airStrdup(oldArgv[oldArgc]);
+ if (!parm->respFileEnable || parm->respFileFlag != oldArgv[argIdx][0]) {
+ /* either ignoring response files, or its not a response file:
+ we copy the arg, remember to free it, and increment the new arg idx */
+ newArgv[newArgc] = airStrdup(oldArgv[argIdx]);
airMopAdd(pmop, newArgv[newArgc], airFree, airMopAlways);
newArgc += 1;
} else {
/* It is a response file. Error checking on open-ability
should have been done by _hestArgsInResponseFiles() */
- file = fopen(oldArgv[oldArgc] + 1, "rb");
+ file = fopen(oldArgv[argIdx] + 1, "rb");
+ /* start line-reading loop */
len = airOneLine(file, line, AIR_STRLEN_HUGE + 1);
while (len > 0) {
+ unsigned rgi;
if (parm->verbosity) printf("%s: line: |%s|\n", me, line);
/* HEY HEY too bad for you if you put # inside a string */
if ((pound = strchr(line, parm->respFileComment))) *pound = '\0';
@@ -166,10 +186,10 @@
incr = airStrntok(line, AIR_WHITESPACE);
if (parm->verbosity) printf("%s: -1-> line: |%s|, incr=%d\n", me, line, incr);
airParseStrS(newArgv + newArgc, line, AIR_WHITESPACE, incr, AIR_FALSE);
- for (ai = 0; ai < incr; ai++) {
+ for (rgi = 0; rgi < incr; rgi++) {
/* This time, we did allocate memory. We can use airFree and
not airFreeP because these will not be reset before mopping */
- airMopAdd(pmop, newArgv[newArgc + ai], airFree, airMopAlways);
+ airMopAdd(pmop, newArgv[newArgc + rgi], airFree, airMopAlways);
}
len = airOneLine(file, line, AIR_STRLEN_HUGE + 1);
newArgc += incr;
@@ -176,12 +196,12 @@
}
fclose(file);
}
- oldArgc++;
if (parm->verbosity) {
printArgv(newArgc, newArgv, " ");
- printf("%s: ^^^^^^^ newArgc = %d, oldArgc = %d\n", me, newArgc, oldArgc);
+ printf("%s: ^^^^^^^ newArgc = %d, argIdx = %d\n", me, newArgc, argIdx);
}
}
+ /* NULL-terminate newArgv[] */
newArgv[newArgc] = NULL;
return newArgc;
@@ -1395,7 +1415,8 @@
static const char me[] = "hestParse: ";
char *param, *param_copy;
char **argv, **prms, *err;
- int a, argc, argc_used, argr, *appr, *udflt, nrf, numOpts, big, ret, i, sawHelp;
+ int a, argc, argc_used, respArgNum, *appr, *udflt, respFileNum, numOpts, big, ret, i,
+ sawHelp;
unsigned int *nprm;
airArray *mop;
hestParm *parm;
@@ -1463,15 +1484,17 @@
by seeing how many args are in the response files, and then adding
on the args from the actual argv (getting this right the first time
greatly simplifies the problem of eliminating memory leaks) */
- if (_hestArgsInResponseFiles(&argr, &nrf, _argv, err, PARM)) {
+ if (_hestArgsInResponseFiles(&respArgNum, &respFileNum, _argv, err, PARM)) {
airMopError(mop);
return 1;
}
- argc = argr + _argc - nrf;
+ /* the effective # args is superficial _argc, adjusted for how every response filename
+ is effectively removed and then replace by its contents */
+ argc = _argc + respArgNum - respFileNum;
if (PARM->verbosity) {
- printf("%s: nrf = %d; argr = %d; _argc = %d --> argc = %d\n", me, nrf, argr, _argc,
- argc);
+ printf("%s: respFileNum = %d; respArgNum = %d; _argc = %d --> argc = %d\n", me,
+ respFileNum, respArgNum, _argc, argc);
}
argv = AIR_CALLOC(argc + 1, char *);
airMopMem(mop, &argv, airMopAlways);
Modified: teem/trunk/src/unrrdu/make.c
===================================================================
--- teem/trunk/src/unrrdu/make.c 2025-09-06 16:44:50 UTC (rev 7369)
+++ teem/trunk/src/unrrdu/make.c 2025-09-06 16:53:07 UTC (rev 7370)
@@ -240,6 +240,7 @@
airMopAdd(mop, opt, hestOptFree_vp, airMopAlways);
airStrtokQuoting = AIR_TRUE;
+ /* hparm->verbosity = 3; /* HEY JUST FOR DEBUGGING */
USAGE_OR_PARSE(_unrrdu_makeInfoL);
airMopAdd(mop, opt, (airMopper)hestParseFree, airMopAlways);
encoding = nrrdEncodingArray[encodingType];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 16:44:51
|
Revision: 7369
http://sourceforge.net/p/teem/code/7369
Author: kindlmann
Date: 2025-09-06 16:44:50 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
comment tweaks, including using ### for all section headers
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-06 16:44:50 UTC (rev 7369)
@@ -20,9 +20,20 @@
#
# Teem/CMakeLists.txt Version 10.92
-# Re-written entirely for TeemV2
-#-----------------------------------------------------------------------------
+# This CMakeLists.txt describes a Teem package that contains:
+# (1) a library ("libteem" on unix) and
+# (2) associated command-line tools (like "unu").
+
+# Teem is itself made of component libraries (air, hest, biff, nrrd, etc.) but in CMake
+# we do not compile these as libraries per se: they are merely containers for .c and .h
+# files, which we compile to a single "monolithic" library. Teem also has a separate
+# system of GNUmakefiles (re-written for Teem v2) which do build the finer-grained
+# per-component libraries (libair.a, libhest.a, etc). These remain useful for Teem
+# development, but there's no reason to complicate this CMakeLists.txt with describing
+# those smaller libraries and their inter-dependencies.
+
+###-----------------------------------------------------------------------------
# Project setup: version, metadata, and language
# CMake Version 3.25 came out November 16, 2022
@@ -53,11 +64,16 @@
")
-#-----------------------------------------------------------------------------
-# Module paths and helper includes
+###-----------------------------------------------------------------------------
+# Include helpers and module paths
+# include(CTest) will create the BUILD_TESTING option, turn it ON, hook into CTest, and
+# in turn include(CTestConfig.cmake). Most of which is fine, but we want to turn
+# BUILD_TESTING OFF and give a better description
+set(BUILD_TESTING OFF CACHE BOOL "Build Teem's *meagre* ctests")
+include(CTest)
+
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
-
include(GNUInstallDirs) # sets CMAKE_INSTALL_*DIR variables
include(CMakeParseArguments) # for cmake_parse_arguments
include(CMakePrintHelpers) # for debugging via cmake_print_variables(varname)
@@ -65,7 +81,7 @@
# CMake modules path (for e.g. FindLEVMAR.cmake)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
-#-----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
# Project options, including choosing dependencies
# - canonical list of optional dependencies
# - option() flags for enabling/disabling them
@@ -106,11 +122,10 @@
# Other options
option(Teem_BUILD_HEX_UTILS "Build stand-alone raw<-->hex decoder/encoder" OFF)
-option(BUILD_TESTING "Build with (in-progress) Teem tests" OFF)
option(Teem_INSTALL_VERSIONED_PREFIX "Install bin/,lib/,include/ in install/Teem-X.Y.Z subdir" OFF)
-#-----------------------------------------------------------------------------
-# RPATH trickery
+###-----------------------------------------------------------------------------
+# RPATH taming
if(UNIX AND NOT APPLE)
# Linux, BSD, etc.
@@ -161,7 +176,7 @@
endif()
endif()
-#-----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
# Dependency discovery
# - normalize names/targets/FOUND vars
# - run find_package() for requested DEPs
@@ -200,7 +215,7 @@
# but now, after the foreach above, we have: ${_cpname_${_tdep}}
# With all that uniformity set up: try to find_package() for all DEPs requested,
-# and set Teem_HAVE_DEP if we did find it (we have it)
+# and set Teem_HAVE_DEP if we did find it (i.e. we "have" it)
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_USE_${_tdep})
# this DEP is requested
@@ -217,7 +232,7 @@
#get_target_property(_png_libs PNG::PNG INTERFACE_LINK_LIBRARIES)
#message(STATUS "PNG::PNG links to: ${_png_libs}")
-#-----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
# Describe install directory layout with variables:
# HEADERS_INSTALL_DIR, LIB_INSTALL_DIR, BIN_INSTALL_DIR, CONFIG_INSTALL_DIR
# which are paths to the different things relative to the install prefix
@@ -239,7 +254,7 @@
# so that BIN_INSTALL_DIR can be seen by src/bin/CMakeLists.txt
set(BIN_INSTALL_DIR "${BIN_INSTALL_DIR}" CACHE INTERNAL "Install dir for binaries")
-#-----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
# Configure-time test: does AIR_EXISTS() work like isfinite()?
# A lot of work for one little macro (which GLK started using before the functionally
@@ -340,12 +355,9 @@
endif()
# AIR_EXISTS_MACRO_FAILS is used indirectly, below, by configure_file(airExistsConf.h)
-#-----------------------------------------------------------------------------
-# We gather here to build the monolithic library 'libteem'
+###-----------------------------------------------------------------------------
+# Describe the Teem library
-# (whereas the old-but-recently-updated GNUmakefiles build finer-grained per-library
-# libraries libair, libbiff, etc, which are still needed for Teem hacking
-
add_library(Teem "")
# Ensure build's include dir exists for generated headers
@@ -365,13 +377,13 @@
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_HAVE_${_tdep})
message(STATUS "Will use ${_tdep}: ${_doc_${_tdep}}")
- target_compile_definitions(Teem PUBLIC "TEEM_${_tdep}")
- # This attaches DEP=${_target_${_tdep}} to the Teem target, but not any particular
- # command-line executable. It is PRIVATE because Teem is designed to not directly
- # expose any thing from, say, png.h or libpng in its API or ABI - there are always
- # stub alternatives for when DEP is not used. PRIVATE is saying: use DEP when
- # building the target, but do not automatically propagate DEP to things (like unu)
- # depending on the target
+ # Why PRIVATE for both of these: Teem is designed to not directly expose any thing
+ # from, say, png.h or libpng in its API or ABI - there are always stub alternatives
+ # for when DEP is not used. Compiling of Teem-using .c files should not care which
+ # dependencies were or were not enabled. Similarly for linking: we use DEP when
+ # building the target libteem library, but we should not automatically propagate DEP
+ # to executables (like unu) depending on libteem.
+ target_compile_definitions(Teem PRIVATE "TEEM_${_tdep}")
target_link_libraries(Teem PRIVATE "${_target_${_tdep}}")
else()
message(STATUS " (not using ${_tdep}: ${_doc_${_tdep}})")
@@ -382,7 +394,7 @@
# (used as part of handling Windows "extern" analog)
target_compile_definitions(Teem PUBLIC "$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:TEEM_STATIC>")
-#### ---------------- Handling linking with math library libm via -lm
+# # # - - - - - - - - - - - Handling linking with math library libm via -lm
# We could be brute-force, and add -lm to link line for any and all Unices:
# if(UNIX)
# target_link_libraries(Teem PRIVATE m)
@@ -393,6 +405,7 @@
# https://cmake.org/cmake/help/latest/module/CheckSourceCompiles.html
include(CheckSourceCompiles)
+# Tiny test program that calls sin()
set(_Teem_libm_test_source "
#include <math.h>
int main(void) { return (int)sin(0.0); }
@@ -401,13 +414,13 @@
# Always start with a clean slate
unset(CMAKE_REQUIRED_LIBRARIES)
-# First try without -lm
+# First try compiling without -lm
check_source_compiles(C "${_Teem_libm_test_source}" HAVE_SIN_WITHOUT_LIBM)
if(HAVE_SIN_WITHOUT_LIBM)
message(STATUS "sin() found without libm; do NOT need to link with -lm")
else()
- # Retry with -lm
+ # Retry compiling with -lm
set(CMAKE_REQUIRED_LIBRARIES m)
check_source_compiles(C "${_Teem_libm_test_source}" HAVE_SIN_WITH_LIBM)
unset(CMAKE_REQUIRED_LIBRARIES)
@@ -419,7 +432,7 @@
message(FATAL_ERROR "Could not find sin() at all!")
endif()
endif()
-#### ---------------- end of handling -lm
+# # # - - - - - - - - - - - end of handling -lm
# Set remaining target properties
set_target_properties(Teem PROPERTIES
@@ -429,14 +442,14 @@
POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
)
-#-----------------------------------------------------------------------------
-# Teem's component libraries
+###-----------------------------------------------------------------------------
+# Collect sources from Teem's component libraries
# Each component library will append its public headers to global property
# "Teem_HEADER_FILES". For clarity, we initialize it to empty string now.
set_property(GLOBAL PROPERTY Teem_HEADER_FILES "")
-# Helper function component library call to declare its contribution
+# Helper function that a component library calls to declare its contribution
function(_Teem_add_library _pathtolib)
get_filename_component(_lib ${_pathtolib} NAME)
cmake_parse_arguments(${_lib} "" "" "SOURCES;PUBLIC_HEADERS" ${ARGN})
@@ -450,11 +463,11 @@
# 2. Collect public headers for installation
set_property(GLOBAL APPEND PROPERTY Teem_HEADER_FILES ${${_lib}_LIB_PUBLIC_HEADERS})
- # 3. Add sources for compilation
- # (headers will be seen via dependency analysis)
+ # 3. Add all .c sources for compilation
+ # (.h headers will be seen via dependency analysis)
target_sources(Teem PRIVATE ${${_lib}_SOURCES})
- # 4. IDE grouping of library using TREE (modern CMake) under single "Teem/src" prefix
+ # 4. IDE grouping of library using TREE under single "Teem/src" prefix
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/${_lib}"
PREFIX "Teem/src/${_lib}"
@@ -464,17 +477,16 @@
)
endfunction()
+# Read in CMakeLists.txt of each library; each one is just a _Teem_add_library() call
# (TEEM_LIB_LIST)
set(Teem_LIBRARIES
air hest biff nrrd ell moss unrrdu alan tijk gage dye bane
limn echo hoover seek ten elf pull coil push mite meet)
-# Read in CMakeLists.txt of each library
foreach(_dir IN LISTS Teem_LIBRARIES)
- # each CMakeLists.txt is just a single call to _Teem_add_library()
add_subdirectory(src/${_dir})
endforeach()
-if(0) # inspecting the properties
+if(0) # inspecting the properties set so far
# confirm results of prior target_link_libraries(PRIVATE)s
# (what dependencies do I consume)
get_target_property(_Teem_libs Teem LINK_LIBRARIES)
@@ -505,10 +517,10 @@
message(STATUS "Teem INTERFACE_COMPILE_DEFINITIONS: ${teem_inter_compdefs}")
endif()
-#-----------------------------------------------------------------------------
-# Public headers
+###-----------------------------------------------------------------------------
+# Declare Teem's public headers
-# Set *variable* _Teem_headers from *property* Teem_HEADER_FILES
+# Set *variable* _Teem_headers from previously set *property* Teem_HEADER_FILES
get_property(_Teem_headers GLOBAL PROPERTY Teem_HEADER_FILES)
# cmake_print_variables(_Teem_headers)
@@ -550,12 +562,12 @@
FILES ${_Teem_headers_full} # the list of header files
)
-#-----------------------------------------------------------------------------
-# We also gather here to build the command-line executables (e.g. "unu")
+###-----------------------------------------------------------------------------
+# Describe Teem's command-line executables (e.g. "unu")
add_subdirectory(src/bin)
-#-----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
# Optional helper tools (hex/dehex)
# If requested, helper dehex/exhex programs
@@ -563,19 +575,17 @@
add_subdirectory(src/hex)
endif()
-#-----------------------------------------------------------------------------
-# Testing
+###-----------------------------------------------------------------------------
+# Testing via CTest
# Note: these tests are very incomplete. It is unclear how much of Teem's future
# development will hinge on CTest-based testing, now that the Python/CFFI bindings
# offer a much more convenient way to call into Teem.
if(BUILD_TESTING)
- include(CTest)
- enable_testing()
- add_subdirectory(Testing) # add Teem-specific tests
+ add_subdirectory(tests/ctest)
endif()
-#-----------------------------------------------------------------------------
+###-----------------------------------------------------------------------------
# Install rules
# Declare how Teem should be installed, and hang all this off the "TeemTargets" export
@@ -598,7 +608,7 @@
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_USE_${_tdep})
if(NOT _Teem_find_deps)
- # before first dependency have to say what find_dependency means
+ # before first dependency we have to say what find_dependency() means
string(APPEND _Teem_find_deps "include(CMakeFindDependencyMacro)\n")
endif()
# Map to CMake package name
@@ -610,7 +620,7 @@
string(APPEND _Teem_find_deps "# (actually, no dependencies in this Teem build)\n")
endif()
# Then, empower the upcoming configure_package_config_file command to convert
-# @Teem_CONFIG_DEPENDENCIES@ (appearing in TeemConfig.cmake.in) to _Teem_find_deps
+# @Teem_CONFIG_DEPENDENCIES@ (appearing in TeemConfig.cmake.in) to ${_Teem_find_deps}
set(Teem_CONFIG_DEPENDENCIES "${_Teem_find_deps}")
# If we redefined CMAKE_INSTALL_PREFIX (because Teem_INSTALL_VERSIONED_PREFIX was ON),
# record it for TeemConfig.cmake
@@ -628,9 +638,9 @@
VERSION ${Teem_VERSION_STRING}
# Teem v2 does have non-zero ABI and API changes from Teem pre-v2, hence the
# SameMajorVersion instead of AnyNewerVersion below. Most Teem-using code will likely
- # not need changing to use v2, but it probably should be recompiled. We are honoring
- # the expectations of the semantic versioning that Teem bought in 2005 with version
- # 1.9.0.
+ # not need changing to use v2, but it does need to be recompiled. To honor the
+ # expectations of the semantic versioning that Teem adopted in 2005 with version
+ # 1.9.0, the major version boundary has to mean something
COMPATIBILITY SameMajorVersion
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 16:35:04
|
Revision: 7368
http://sourceforge.net/p/teem/code/7368
Author: kindlmann
Date: 2025-09-06 16:34:59 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
ok its a little goofy to have a preamble here
Modified Paths:
--------------
teem/trunk/src/air/CMakeLists-v2.txt
teem/trunk/src/alan/CMakeLists-v2.txt
teem/trunk/src/bane/CMakeLists-v2.txt
teem/trunk/src/biff/CMakeLists-v2.txt
teem/trunk/src/bin/CMakeLists-v2.txt
teem/trunk/src/coil/CMakeLists-v2.txt
teem/trunk/src/dye/CMakeLists-v2.txt
teem/trunk/src/echo/CMakeLists-v2.txt
teem/trunk/src/elf/CMakeLists-v2.txt
teem/trunk/src/ell/CMakeLists-v2.txt
teem/trunk/src/gage/CMakeLists-v2.txt
teem/trunk/src/hest/CMakeLists-v2.txt
teem/trunk/src/hex/CMakeLists-v2.txt
teem/trunk/src/hoover/CMakeLists-v2.txt
teem/trunk/src/limn/CMakeLists-v2.txt
teem/trunk/src/meet/CMakeLists-v2.txt
teem/trunk/src/mite/CMakeLists-v2.txt
teem/trunk/src/moss/CMakeLists-v2.txt
teem/trunk/src/nrrd/CMakeLists-v2.txt
teem/trunk/src/pull/CMakeLists-v2.txt
teem/trunk/src/push/CMakeLists-v2.txt
teem/trunk/src/seek/CMakeLists-v2.txt
teem/trunk/src/ten/CMakeLists-v2.txt
teem/trunk/src/tijk/CMakeLists-v2.txt
teem/trunk/src/unrrdu/CMakeLists-v2.txt
Modified: teem/trunk/src/air/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/air/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/air/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
# list here pasted in from:
Modified: teem/trunk/src/alan/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/alan/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/alan/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
coreAlan.c enumsAlan.c methodsAlan.c
Modified: teem/trunk/src/bane/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/bane/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/bane/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
clip.c defaultsBane.c gkmsFlotsam.c gkmsHvol.c gkmsInfo.c gkmsMite.c gkmsOpac.c
Modified: teem/trunk/src/biff/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/biff/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/biff/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
biffbiff.c biffmsg.c
Modified: teem/trunk/src/bin/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/bin/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/bin/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
# Define a helper for Teem command-line tools
function(teem_add_executable name)
add_executable(${name} ${ARGN})
Modified: teem/trunk/src/coil/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/coil/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/coil/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
coreCoil.c defaultsCoil.c enumsCoil.c methodsCoil.c realmethods.c scalarCoil.c
Modified: teem/trunk/src/dye/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/dye/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/dye/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
convertDye.c methodsDye.c
Modified: teem/trunk/src/echo/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/echo/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/echo/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
bounds.c color.c enumsEcho.c intx.c lightEcho.c list.c matter.c methodsEcho.c
Modified: teem/trunk/src/elf/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/elf/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/elf/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
ballStickElf.c ESHEstimElf.c glyphElf.c maximaElf.c
Modified: teem/trunk/src/ell/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/ell/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/ell/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
cubicEll.c eigen.c genmat.c mat.c miscEll.c quat.c vecEll.c
Modified: teem/trunk/src/gage/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/gage/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/gage/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
# NOT including multiGage.c for now, and scl3pfilterbody.c is just a macro
Modified: teem/trunk/src/hest/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/hest/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/hest/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
adders.c defaultsHest.c methodsHest.c parseHest.c usage.c
Modified: teem/trunk/src/hex/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/hex/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/hex/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
# helper function HEY copied from ../bin/CMakeLists.txt
function(teem_add_executable name)
add_executable(${name} ${ARGN})
Modified: teem/trunk/src/hoover/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/hoover/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/hoover/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
defaultsHoover.c methodsHoover.c rays.c stub.c
Modified: teem/trunk/src/limn/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/limn/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/limn/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
# NOTE: used to be that lpu_*.c files were not listed here, since the CMake
Modified: teem/trunk/src/meet/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/meet/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/meet/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
enumall.c meetGage.c meetNrrd.c meetPull.c
Modified: teem/trunk/src/mite/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/mite/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/mite/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
defaultsMite.c kindnot.c ray.c renderMite.c shade.c thread.c txf.c user.c
Modified: teem/trunk/src/moss/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/moss/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/moss/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
defaultsMoss.c hestMoss.c methodsMoss.c sampler.c xform.c
Modified: teem/trunk/src/nrrd/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/nrrd/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/nrrd/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
accessors.c apply1D.c apply2D.c arith.c arraysNrrd.c axis.c bsplKernel.c cc.c
Modified: teem/trunk/src/pull/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/pull/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/pull/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
actionPull.c binningPull.c ccPull.c constraints.c contextPull.c corePull.c
Modified: teem/trunk/src/push/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/push/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/push/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
action.c binning.c corePush.c defaultsPush.c forces.c methodsPush.c setup.c
Modified: teem/trunk/src/seek/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/seek/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/seek/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
descend.c enumsSeek.c extract.c methodsSeek.c setSeek.c tables.c textract.c
Modified: teem/trunk/src/ten/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/ten/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/ten/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
aniso.c bimod.c bvec.c chan.c defaultsTen.c enumsTen.c epireg.c estimate.c
Modified: teem/trunk/src/tijk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/tijk/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/tijk/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
2dTijk.c 3dTijk.c approxTijk.c enumsTijk.c fsTijk.c miscTijk.c nrrdTijk.c
Modified: teem/trunk/src/unrrdu/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/unrrdu/CMakeLists-v2.txt 2025-09-06 16:20:02 UTC (rev 7367)
+++ teem/trunk/src/unrrdu/CMakeLists-v2.txt 2025-09-06 16:34:59 UTC (rev 7368)
@@ -1,22 +1,3 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2005--2008 Gordon Kindlmann
-# Copyright (C) 1998--2004 University of Utah
-#
-# This library is free software; you can redistribute it and/or modify it under the terms
-# of the GNU Lesser General Public License (LGPL) as published by the Free Software
-# Foundation; either version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also include exceptions to
-# the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
SOURCES
flotsam.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 16:20:10
|
Revision: 7367
http://sourceforge.net/p/teem/code/7367
Author: kindlmann
Date: 2025-09-06 16:20:02 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
tweaks
Modified Paths:
--------------
teem/trunk/CTestConfig.cmake
Modified: teem/trunk/CTestConfig.cmake
===================================================================
--- teem/trunk/CTestConfig.cmake 2025-09-06 16:10:12 UTC (rev 7366)
+++ teem/trunk/CTestConfig.cmake 2025-09-06 16:20:02 UTC (rev 7367)
@@ -1,34 +1,23 @@
+# CTestConfig.cmake - Dashboard submission settings for Teem
+# Copyright (C) 1998--2025 Teem contributors
+# Licensed under the GNU LGPL v2.1 or later (see LICENSE.txt for details)
+
+# This file is used only when running CTest in "dashboard mode":
+# ctest -D Experimental
+# ctest -D Nightly
+# ctest -D Continuous
#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
+# Local developer runs (just `ctest`) do NOT use this file.
-## This file should be placed in the root directory of your project.
-## Then modify the CMakeLists.txt file in the root directory of your
-## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
-## enable_testing()
-## include(Dart)
+# Project name shown on CDash
set(CTEST_PROJECT_NAME "Teem")
+
+# Define when the "nightly" dashboard day starts
set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")
-set(CTEST_DROP_METHOD "http")
+# Dashboard server information
+# If you don’t use CDash yet, you can leave these as-is or comment them out.
+set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=Teem")
set(CTEST_DROP_SITE_CDASH TRUE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 16:10:14
|
Revision: 7366
http://sourceforge.net/p/teem/code/7366
Author: kindlmann
Date: 2025-09-06 16:10:12 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
actually we delete now not later, because include(CTest) triggers include(DartConfig.cmake) when DartConfig.cmake exists
Removed Paths:
-------------
teem/trunk/DartConfig.cmake
Deleted: teem/trunk/DartConfig.cmake
===================================================================
--- teem/trunk/DartConfig.cmake 2025-09-06 15:58:14 UTC (rev 7365)
+++ teem/trunk/DartConfig.cmake 2025-09-06 16:10:12 UTC (rev 7366)
@@ -1,30 +0,0 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2019 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
-message(FATAL_ERROR "DartConfig.cmake will be deleted soon; no longer used in Teem v2")
-
-include(${CMAKE_SOURCE_DIR}/CTestConfig.cmake)
-set(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}")
-set(DROP_METHOD "${CTEST_DROP_METHOD}")
-set(DROP_SITE "${CTEST_DROP_SITE}")
-set(DROP_LOCATION "${CTEST_DROP_LOCATION}")
-set(TRIGGER_SITE "${CTEST_TRIGGER_SITE}")
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 15:58:16
|
Revision: 7365
http://sourceforge.net/p/teem/code/7365
Author: kindlmann
Date: 2025-09-06 15:58:14 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
these are apparently no longer part of modern CMake/CTest
Modified Paths:
--------------
teem/trunk/DartConfig.cmake
teem/trunk/TestBuild.cmake
Modified: teem/trunk/DartConfig.cmake
===================================================================
--- teem/trunk/DartConfig.cmake 2025-09-06 01:59:34 UTC (rev 7364)
+++ teem/trunk/DartConfig.cmake 2025-09-06 15:58:14 UTC (rev 7365)
@@ -19,6 +19,8 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
+message(FATAL_ERROR "DartConfig.cmake will be deleted soon; no longer used in Teem v2")
+
include(${CMAKE_SOURCE_DIR}/CTestConfig.cmake)
set(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}")
set(DROP_METHOD "${CTEST_DROP_METHOD}")
Modified: teem/trunk/TestBuild.cmake
===================================================================
--- teem/trunk/TestBuild.cmake 2025-09-06 01:59:34 UTC (rev 7364)
+++ teem/trunk/TestBuild.cmake 2025-09-06 15:58:14 UTC (rev 7365)
@@ -19,6 +19,8 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
+message(FATAL_ERROR "TestBuild.cmake will be deleted soon; no longer used in Teem v2")
+
# Where the source code lives
set (CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}")
set (CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build-ctest")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-06 01:59:37
|
Revision: 7364
http://sourceforge.net/p/teem/code/7364
Author: kindlmann
Date: 2025-09-06 01:59:34 +0000 (Sat, 06 Sep 2025)
Log Message:
-----------
moving files around
Added Paths:
-----------
teem/trunk/tests/
teem/trunk/tests/ctest/
teem/trunk/tests/ctest/CMakeLists.txt
teem/trunk/tests/ctest/air/
teem/trunk/tests/ctest/biff/
teem/trunk/tests/ctest/gage/
teem/trunk/tests/ctest/meet/
teem/trunk/tests/ctest/nrrd/
teem/trunk/tests/ctest/ten/
teem/trunk/tests/ctest/testDataPath.h.in
teem/trunk/tests/ctest/unrrdu/
Removed Paths:
-------------
teem/trunk/Testing/
teem/trunk/tests/CMakeLists.txt
teem/trunk/tests/air/
teem/trunk/tests/biff/
teem/trunk/tests/gage/
teem/trunk/tests/meet/
teem/trunk/tests/nrrd/
teem/trunk/tests/ten/
teem/trunk/tests/testDataPath.h.in
teem/trunk/tests/unrrdu/
Deleted: teem/trunk/tests/CMakeLists.txt
===================================================================
--- teem/trunk/Testing/CMakeLists.txt 2025-09-05 17:48:54 UTC (rev 7363)
+++ teem/trunk/tests/CMakeLists.txt 2025-09-06 01:59:34 UTC (rev 7364)
@@ -1,68 +0,0 @@
-#
-# Teem: Tools to process and visualize scientific data and images
-# Copyright (C) 2009--2025 University of Chicago
-# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
-# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# (LGPL) as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# The terms of redistributing and/or modifying this software also
-# include exceptions to the LGPL that facilitate static linking.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <https://www.gnu.org/licenses/>.
-#
-
-project(TEEMTesting)
-
-# Create a header file with the path to the data in it. Note that we don't
-# have to make these paths "windows friendly" as it turns out windows can read
-# forward slashed paths.
-set(TESTING_DATA_PATH "${CMAKE_SOURCE_DIR}/data" CACHE PATH
- "Path to testing data")
-mark_as_advanced(TESTING_DATA_PATH)
-
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/testDataPath.h.in"
- "${CMAKE_BINARY_DIR}/include/testDataPath.h"
- )
-
-# nrrdSanity the executable is no longer (as of Teem v2) built;
-# so this is being removed. Lots of tests will immediately fail
-# if nrrdSanity() (the function) fails.
-## This just runs nrrdSanity as test called "nrrd.Sanity"
-## We don't do the same for airSanity because that's an
-## "experimental app" . . .
-# add_test(NAME nrrd.Sanity COMMAND $<TARGET_FILE:nrrdSanity>)
-
-# Hope to eventually have tests in all directories; until then
-# many of these are commented out. (TEEM_LIB_LIST)
-add_subdirectory(air)
-# add_subdirectory(hest)
-add_subdirectory(biff)
-add_subdirectory(nrrd)
-# add_subdirectory(ell)
-# add_subdirectory(moss)
-add_subdirectory(unrrdu)
-# add_subdirectory(alan)
-# add_subdirectory(tijk)
-add_subdirectory(gage)
-# add_subdirectory(dye)
-# add_subdirectory(bane)
-# add_subdirectory(limn)
-# add_subdirectory(echo)
-# add_subdirectory(hoover)
-# add_subdirectory(seek)
-add_subdirectory(ten)
-# add_subdirectory(elf)
-# add_subdirectory(pull)
-# add_subdirectory(coil)
-# add_subdirectory(push)
-# add_subdirectory(mite)
-add_subdirectory(meet)
Copied: teem/trunk/tests/ctest/CMakeLists.txt (from rev 7363, teem/trunk/Testing/CMakeLists.txt)
===================================================================
--- teem/trunk/tests/ctest/CMakeLists.txt (rev 0)
+++ teem/trunk/tests/ctest/CMakeLists.txt 2025-09-06 01:59:34 UTC (rev 7364)
@@ -0,0 +1,68 @@
+#
+# Teem: Tools to process and visualize scientific data and images
+# Copyright (C) 2009--2025 University of Chicago
+# Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
+# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# (LGPL) as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+# The terms of redistributing and/or modifying this software also
+# include exceptions to the LGPL that facilitate static linking.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, see <https://www.gnu.org/licenses/>.
+#
+
+project(TEEMTesting)
+
+# Create a header file with the path to the data in it. Note that we don't
+# have to make these paths "windows friendly" as it turns out windows can read
+# forward slashed paths.
+set(TESTING_DATA_PATH "${CMAKE_SOURCE_DIR}/data" CACHE PATH
+ "Path to testing data")
+mark_as_advanced(TESTING_DATA_PATH)
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/testDataPath.h.in"
+ "${CMAKE_BINARY_DIR}/include/testDataPath.h"
+ )
+
+# nrrdSanity the executable is no longer (as of Teem v2) built;
+# so this is being removed. Lots of tests will immediately fail
+# if nrrdSanity() (the function) fails.
+## This just runs nrrdSanity as test called "nrrd.Sanity"
+## We don't do the same for airSanity because that's an
+## "experimental app" . . .
+# add_test(NAME nrrd.Sanity COMMAND $<TARGET_FILE:nrrdSanity>)
+
+# Hope to eventually have tests in all directories; until then
+# many of these are commented out. (TEEM_LIB_LIST)
+add_subdirectory(air)
+# add_subdirectory(hest)
+add_subdirectory(biff)
+add_subdirectory(nrrd)
+# add_subdirectory(ell)
+# add_subdirectory(moss)
+add_subdirectory(unrrdu)
+# add_subdirectory(alan)
+# add_subdirectory(tijk)
+add_subdirectory(gage)
+# add_subdirectory(dye)
+# add_subdirectory(bane)
+# add_subdirectory(limn)
+# add_subdirectory(echo)
+# add_subdirectory(hoover)
+# add_subdirectory(seek)
+add_subdirectory(ten)
+# add_subdirectory(elf)
+# add_subdirectory(pull)
+# add_subdirectory(coil)
+# add_subdirectory(push)
+# add_subdirectory(mite)
+add_subdirectory(meet)
Copied: teem/trunk/tests/ctest/testDataPath.h.in (from rev 7363, teem/trunk/Testing/testDataPath.h.in)
===================================================================
--- teem/trunk/tests/ctest/testDataPath.h.in (rev 0)
+++ teem/trunk/tests/ctest/testDataPath.h.in 2025-09-06 01:59:34 UTC (rev 7364)
@@ -0,0 +1,61 @@
+/*
+ Teem: Tools to process and visualize scientific data and images
+ Copyright (C) 2009--2019 University of Chicago
+ Copyright (C) 2011 James Bigler
+ Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
+ Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ (LGPL) as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also
+ include exceptions to the LGPL that facilitate static linking.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, see <https://www.gnu.org/licenses/>.
+*/
+
+#define TESTING_DATA_PATH "${TESTING_DATA_PATH}"
+
+#include <stdlib.h>
+#include <string.h>
+#include <teem/air.h>
+
+/*
+** testDataPathPrefix allocates and returns a string which is
+** the given "base" prefixed with the path to the test datasets,
+** including the "/" between the path and "base". Caller is
+** responsible for freeing.
+**
+** Thanks to James Bigler for writing the first version of this.
+*/
+static char*
+testDataPathPrefix(const char* base) {
+ size_t pathLen, baseLen;
+ char* result;
+ /* You could add an environment variable override here */
+ /* if (getenv(TESTING_DATA_PATH)) */
+
+ /* concatenate the strings together */
+ pathLen = strlen(TESTING_DATA_PATH);
+ baseLen = strlen(base);
+ /* Allocate enough for the two parts of the string, plus one for the /
+ * and one for the null terminator */
+ result = AIR_CALLOC(pathLen + baseLen + 2, char);
+ if (result) {
+ /*
+ strcat(result, TESTING_DATA_PATH);
+ strcat(result, "/");
+ strcat(result, base);
+ */
+ airStrcpy(result, pathLen + 1, TESTING_DATA_PATH);
+ result[pathLen] = '/';
+ airStrcpy(result+pathLen+1, baseLen + 1, base);
+ }
+ return result;
+}
Deleted: teem/trunk/tests/testDataPath.h.in
===================================================================
--- teem/trunk/Testing/testDataPath.h.in 2025-09-05 17:48:54 UTC (rev 7363)
+++ teem/trunk/tests/testDataPath.h.in 2025-09-06 01:59:34 UTC (rev 7364)
@@ -1,61 +0,0 @@
-/*
- Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2019 University of Chicago
- Copyright (C) 2011 James Bigler
- Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
- Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- (LGPL) as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- The terms of redistributing and/or modifying this software also
- include exceptions to the LGPL that facilitate static linking.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library; if not, see <https://www.gnu.org/licenses/>.
-*/
-
-#define TESTING_DATA_PATH "${TESTING_DATA_PATH}"
-
-#include <stdlib.h>
-#include <string.h>
-#include <teem/air.h>
-
-/*
-** testDataPathPrefix allocates and returns a string which is
-** the given "base" prefixed with the path to the test datasets,
-** including the "/" between the path and "base". Caller is
-** responsible for freeing.
-**
-** Thanks to James Bigler for writing the first version of this.
-*/
-static char*
-testDataPathPrefix(const char* base) {
- size_t pathLen, baseLen;
- char* result;
- /* You could add an environment variable override here */
- /* if (getenv(TESTING_DATA_PATH)) */
-
- /* concatenate the strings together */
- pathLen = strlen(TESTING_DATA_PATH);
- baseLen = strlen(base);
- /* Allocate enough for the two parts of the string, plus one for the /
- * and one for the null terminator */
- result = AIR_CALLOC(pathLen + baseLen + 2, char);
- if (result) {
- /*
- strcat(result, TESTING_DATA_PATH);
- strcat(result, "/");
- strcat(result, base);
- */
- airStrcpy(result, pathLen + 1, TESTING_DATA_PATH);
- result[pathLen] = '/';
- airStrcpy(result+pathLen+1, baseLen + 1, base);
- }
- return result;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-05 17:48:57
|
Revision: 7363
http://sourceforge.net/p/teem/code/7363
Author: kindlmann
Date: 2025-09-05 17:48:54 +0000 (Fri, 05 Sep 2025)
Log Message:
-----------
fixing versioned subdir installs; now better conforms to conventions
Modified Paths:
--------------
teem/trunk/CMake/TeemConfig.cmake-v2.in
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMake/TeemConfig.cmake-v2.in
===================================================================
--- teem/trunk/CMake/TeemConfig.cmake-v2.in 2025-09-05 17:47:04 UTC (rev 7362)
+++ teem/trunk/CMake/TeemConfig.cmake-v2.in 2025-09-05 17:48:54 UTC (rev 7363)
@@ -31,6 +31,10 @@
set(Teem_VERSION_PATCH @Teem_VERSION_PATCH@)
set(Teem_VERSION "@Teem_VERSION_STRING@")
+# Where this Teem package was installed
+set(Teem_INSTALL_PREFIX "@Teem_EFFECTIVE_INSTALL_PREFIX@")
+message(STATUS "Found Teem @Teem_VERSION_STRING@ at ${Teem_INSTALL_PREFIX}")
+
# Tools installed with Teem (optional metadata)
set(Teem_TOOLS "@Teem_TOOLS@")
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-05 17:47:04 UTC (rev 7362)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-05 17:48:54 UTC (rev 7363)
@@ -19,7 +19,7 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# Teem/CMakeLists.txt Version 10.892
+# Teem/CMakeLists.txt Version 10.92
# Re-written entirely for TeemV2
#-----------------------------------------------------------------------------
@@ -38,6 +38,7 @@
project(Teem VERSION ${Teem_VERSION_STRING}
DESCRIPTION "Teem libraries developed by Gordon Kindlmann et al."
+ HOMEPAGE_URL "https://teem.sourceforge.net/"
LANGUAGES C)
message(STATUS "
@@ -57,7 +58,7 @@
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
-include(GNUInstallDirs) # sets CMAKE_INSTALL_* variables
+include(GNUInstallDirs) # sets CMAKE_INSTALL_*DIR variables
include(CMakeParseArguments) # for cmake_parse_arguments
include(CMakePrintHelpers) # for debugging via cmake_print_variables(varname)
@@ -106,7 +107,7 @@
# Other options
option(Teem_BUILD_HEX_UTILS "Build stand-alone raw<-->hex decoder/encoder" OFF)
option(BUILD_TESTING "Build with (in-progress) Teem tests" OFF)
-option(Teem_INSTALL_VERSIONED_SUBDIRS "Install in Teem-X.Y subdir of install/{bin,lib,include}" OFF)
+option(Teem_INSTALL_VERSIONED_PREFIX "Install bin/,lib/,include/ in install/Teem-X.Y.Z subdir" OFF)
#-----------------------------------------------------------------------------
# RPATH trickery
@@ -142,7 +143,7 @@
# because the relative layout is the same.
# HEY build bin fail, but install bin ok + ok post mv installdir
set(CMAKE_INSTALL_RPATH "@loader_path/../lib")
- # With this, build bin works and install bin works, but can't mv installdir
+ # With this, both build bin works and install bin works, but can't move installdir
#set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
@@ -220,21 +221,21 @@
# Describe install directory layout with variables:
# HEADERS_INSTALL_DIR, LIB_INSTALL_DIR, BIN_INSTALL_DIR, CONFIG_INSTALL_DIR
# which are paths to the different things relative to the install prefix
+# (which may be a versioned subdirectory, if requested)
# The CMAKE_INSTALL_* variables were set by include(GNUInstallDirs).
-if(Teem_INSTALL_VERSIONED_SUBDIRS)
- set(_verpath "teem-${Teem_VERSION_STRING}")
- set(HEADERS_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${_verpath}")
- set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/${_verpath}")
- set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}/${_verpath}")
- # We do want package name "Teem" here, not teem
- set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/${_verpath}/cmake/Teem")
-else()
- set(HEADERS_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
- set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
- set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
- set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/Teem")
+if(Teem_INSTALL_VERSIONED_PREFIX)
+ # redefine the whole prefix: <prefix>/Teem-X.Y.Z/
+ set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Teem-${Teem_VERSION_STRING}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
endif()
+
+# Now just use GNUInstallDirs defaults
+set(HEADERS_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
+set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/Teem")
+
# so that BIN_INSTALL_DIR can be seen by src/bin/CMakeLists.txt
set(BIN_INSTALL_DIR "${BIN_INSTALL_DIR}" CACHE INTERNAL "Install dir for binaries")
@@ -473,7 +474,7 @@
add_subdirectory(src/${_dir})
endforeach()
-if(0)
+if(0) # inspecting the properties
# confirm results of prior target_link_libraries(PRIVATE)s
# (what dependencies do I consume)
get_target_property(_Teem_libs Teem LINK_LIBRARIES)
@@ -608,9 +609,12 @@
# if, actually, there aren't any dependencies, add a comment saying so
string(APPEND _Teem_find_deps "# (actually, no dependencies in this Teem build)\n")
endif()
-# Then, empower the next configure command to convert @Teem_CONFIG_DEPENDENCIES@
-# (appearing in TeemConfig.cmake.in) to _Teem_find_deps
+# Then, empower the upcoming configure_package_config_file command to convert
+# @Teem_CONFIG_DEPENDENCIES@ (appearing in TeemConfig.cmake.in) to _Teem_find_deps
set(Teem_CONFIG_DEPENDENCIES "${_Teem_find_deps}")
+# If we redefined CMAKE_INSTALL_PREFIX (because Teem_INSTALL_VERSIONED_PREFIX was ON),
+# record it for TeemConfig.cmake
+set(Teem_EFFECTIVE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# now finally generate TeemConfig.cmake
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/CMake/TeemConfig.cmake.in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-05 17:47:05
|
Revision: 7362
http://sourceforge.net/p/teem/code/7362
Author: kindlmann
Date: 2025-09-05 17:47:04 +0000 (Fri, 05 Sep 2025)
Log Message:
-----------
fixing exit status: no error here
Modified Paths:
--------------
teem/trunk/UseTeemCMakeDemo/testio.c
Modified: teem/trunk/UseTeemCMakeDemo/testio.c
===================================================================
--- teem/trunk/UseTeemCMakeDemo/testio.c 2025-09-05 06:47:40 UTC (rev 7361)
+++ teem/trunk/UseTeemCMakeDemo/testio.c 2025-09-05 17:47:04 UTC (rev 7362)
@@ -53,7 +53,7 @@
fprintf(stderr, "%s: nrrdSanity() passed\n", me);
if (argc <= 1) {
/* we're done */
- return 1;
+ return 0;
}
const char *fin = argv[1];
@@ -71,7 +71,7 @@
nrrdDescribe(stdout, nrrd);
if (argc == 2) {
/* we're done */
- return 1;
+ return 0;
}
/* write out the array */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|