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-12 03:54:22
|
Revision: 7411
http://sourceforge.net/p/teem/code/7411
Author: kindlmann
Date: 2025-09-12 03:54:18 +0000 (Fri, 12 Sep 2025)
Log Message:
-----------
getting find_package(LEVMAR) into shape
Modified Paths:
--------------
teem/trunk/CMake/FindLEVMAR-v2.cmake
Modified: teem/trunk/CMake/FindLEVMAR-v2.cmake
===================================================================
--- teem/trunk/CMake/FindLEVMAR-v2.cmake 2025-09-12 03:53:31 UTC (rev 7410)
+++ teem/trunk/CMake/FindLEVMAR-v2.cmake 2025-09-12 03:54:18 UTC (rev 7411)
@@ -1,24 +1,140 @@
-# (from cif) suggested usage
-#list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
-#find_package(LEVMAR REQUIRED)
+# CMake/FindLEVMAR.cmake: Careful+verbose way of looking for levmar install
+# ("levmar" = https://users.ics.forth.gr/~lourakis/levmar/index.html)
+# Copyright (C) 2025 University of Chicago
+# See ../LICENSE.txt for licensing terms
+
+# TODO:
+# how is cmake detecting of this levmar also needs lapack and blas?
+# how does find_package(LAPACK/BLAS QUIET) work? is that CMake built-in?
+# check hints to find_path and find_library
+# make sure we're getting the right version of levmar
+# BUILD_SHARED_LIBS with liblevmar.a: [ 96%] Linking C shared library libteem.dylib
+# ld: warning: ignoring duplicate libraries: '-ldl', '-lm', '/Users/gk/src/levmar-2.6/liblevmar.a'
+
+# This module defines:
+# LEVMAR_FOUND - True if both header and library were found
+# LEVMAR_INCLUDE_DIR - Directory containing levmar.h
+# LEVMAR_LIBRARY - Full path to levmar library file
+# LEVMAR_INCLUDE_DIRS - Directories to add to include path (currently just levmar)
+# LEVMAR_LIBRARIES - Libraries to link (levmar plus lapack/blas if found)
#
-#if(LEVMAR_FOUND)
-# include_directories(${LEVMAR_INCLUDE_DIRS})
-# target_link_libraries(your_target ${LEVMAR_LIBRARIES})
-#endif()
+# Usage:
+# find_package(LEVMAR REQUIRED)
+# target_link_libraries(myexe PRIVATE ${LEVMAR_LIBRARIES})
-find_path(LEVMAR_INCLUDE_DIR levmar.h
- PATH_SUFFIXES levmar
+# how we identify ourselves
+set(_dep "LEVMAR")
+
+# Option to enable extra debug output from this module
+option(Teem_${_dep}_DEBUG "Print detailed debug about finding ${_dep}" OFF)
+
+# Helper macros to print only when Teem_${_dep}_DEBUG is enabled
+macro(_status msg)
+ if(Teem_${_dep}_DEBUG)
+ message(STATUS "[Find${_dep}] ${msg}")
+ endif()
+endmacro()
+macro(_check_start msg)
+ if(Teem_${_dep}_DEBUG)
+ message(CHECK_START "[Find${_dep}] ${msg}")
+ endif()
+endmacro()
+macro(_check_fail msg)
+ if(Teem_${_dep}_DEBUG)
+ message(CHECK_FAIL "${msg}")
+ endif()
+endmacro()
+macro(_check_pass msg)
+ if(Teem_${_dep}_DEBUG)
+ message(CHECK_PASS "${msg}")
+ endif()
+endmacro()
+
+# Try to find directory containing levmar.h
+# https://cmake.org/cmake/help/latest/command/find_path.html
+find_path(LEVMAR_INCLUDE_DIR
+ NAMES levmar.h
+ HINTS
+ ${CMAKE_INSTALL_PREFIX}/include
+ /usr/include
+ /usr/local/include
+ PATH_SUFFIXES
+ include
+ levmar
+ DOC "Directory containing levmar.h"
)
+_status("find_path result: LEVMAR_INCLUDE_DIR='${LEVMAR_INCLUDE_DIR}'")
-find_library(LEVMAR_LIBRARY NAMES levmar
- PATH_SUFFIXES lib
+# Try to find full path to liblevmar library file
+find_library(LEVMAR_LIBRARY
+ NAMES levmar
+ HINTS
+ ${CMAKE_INSTALL_PREFIX}/lib
+ /usr/lib
+ /usr/local/lib
+ PATH_SUFFIXES
+ lib
+ DOC "Full path to the liblevmar.\{a\|so\|dylib\|lib\} file"
)
+_status("find_library result: LEVMAR_LIBRARY='${LEVMAR_LIBRARY}'")
+# If we found the library but levmar depends on LAPACK and BLAS, try to find them.
+# Levmar's docs advise having LAPACK/BLAS available to use the full feature set.
+# (This is optional — we don't fail if LAPACK isn't present.)
+if(LEVMAR_LIBRARY) # HEY is this conditional useful?
+ find_package(LAPACK QUIET)
+ if(LAPACK_FOUND)
+ _status("LAPACK found: ${LAPACK_LIBRARIES}")
+ else()
+ _status("LAPACK *not* found")
+ endif()
+
+ find_package(BLAS QUIET)
+ if(BLAS_FOUND)
+ _status("BLAS found: ${BLAS_LIBRARIES}")
+ else()
+ _status("BLAS *not* found")
+ endif()
+endif()
+
+# Include the helper macro for standard handling of results
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LEVMAR DEFAULT_MSG LEVMAR_LIBRARY LEVMAR_INCLUDE_DIR)
+_check_start("find_package_handle_standard_args(LEVMAR)")
+# Standard handling macro: sets LEVMAR_FOUND if successful
+find_package_handle_standard_args(LEVMAR
+ REQUIRED_VARS LEVMAR_INCLUDE_DIR LEVMAR_LIBRARY
+)
if(LEVMAR_FOUND)
+ set(LEVMAR_INCLUDE_DIRS ${LEVMAR_INCLUDE_DIR})
+
set(LEVMAR_LIBRARIES ${LEVMAR_LIBRARY})
- set(LEVMAR_INCLUDE_DIRS ${LEVMAR_INCLUDE_DIR})
+ if(LAPACK_FOUND)
+ list(APPEND LEVMAR_LIBRARIES ${LAPACK_LIBRARIES})
+ endif()
+ if(BLAS_FOUND)
+ list(APPEND LEVMAR_LIBRARIES ${BLAS_LIBRARIES})
+ endif()
+
+ # If we did find LEVMAR, but no imported target exists yet,
+ # create our own IMPORTED target so downstream code can use:
+ # target_link_libraries(myprog PRIVATE FFTW3::fftw3)
+ if(NOT TARGET LEVMAR::LEVMAR)
+ add_library(LEVMAR::LEVMAR UNKNOWN IMPORTED)
+ set_target_properties(LEVMAR::LEVMAR PROPERTIES
+ IMPORTED_LOCATION "${LEVMAR_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${LEVMAR_INCLUDE_DIR}"
+ INTERFACE_LINK_LIBRARIES "${LEVMAR_LIBRARIES}"
+ )
+ endif()
+ _check_pass("Found: LEVMAR_INCLUDE_DIRS=${LEVMAR_INCLUDE_DIRS} LEVMAR_LIBRARIES=${LEVMAR_LIBRARIES}")
+else()
+ _check_fail("Not found")
endif()
+
+# clean up
+unset(_dep)
+unset(_status)
+unset(_check_start)
+unset(_check_fail)
+unset(_check_pass)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-12 03:53:33
|
Revision: 7410
http://sourceforge.net/p/teem/code/7410
Author: kindlmann
Date: 2025-09-12 03:53:31 +0000 (Fri, 12 Sep 2025)
Log Message:
-----------
another diagnostic message
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-12 03:52:47 UTC (rev 7409)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-12 03:53:31 UTC (rev 7410)
@@ -206,6 +206,7 @@
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_USE_${_tdep})
# this DEP is requested
+ message(STATUS "Trying find_package(${_Teem_dep_cpname_${_tdep}})")
find_package(${_Teem_dep_cpname_${_tdep}} QUIET)
if(${_Teem_dep_found_${_tdep}})
set(Teem_HAVE_${_tdep} TRUE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-12 03:52:48
|
Revision: 7409
http://sourceforge.net/p/teem/code/7409
Author: kindlmann
Date: 2025-09-12 03:52:47 +0000 (Fri, 12 Sep 2025)
Log Message:
-----------
future new version
Added Paths:
-----------
teem/trunk/CMake/FindFFTW3-v2.cmake
Added: teem/trunk/CMake/FindFFTW3-v2.cmake
===================================================================
--- teem/trunk/CMake/FindFFTW3-v2.cmake (rev 0)
+++ teem/trunk/CMake/FindFFTW3-v2.cmake 2025-09-12 03:52:47 UTC (rev 7409)
@@ -0,0 +1,62 @@
+# CMake/FindFFTW3.cmake: Slightly better way of looking for FFTW3 package
+# Copyright (C) 2025 University of Chicago
+# See ../LICENSE.txt for licensing terms
+
+# Even though CMake already has a built-in FindFFTW3.cmake, it assumes that fftw3 was
+# installed locally via CMake, but that's not what e.g. (mac) brew or (linux) apt
+# actually does, so find_package(FFTW3) can succeed but is not able to define imported
+# targets for use with target_link_libraries(FFTW3::fftw3) This is a long-standing issue:
+# https://github.com/FFTW/fftw3/issues/130
+# and there must be various solutions out there, since ChatGPT basically wrote the code
+# below (and is characterically unable to provide a citation for similarly simple but
+# working code online)
+
+# TODO: handle the various variants for different precisions
+# See FindFFTW3-multiprec.cmake for inspiration
+
+# NOTE: If a working FFTW3Config.cmake is found, it will define
+# FFTW3::fftw3 for us already, so we don’t have to do anything else.
+# This fallback only runs when FFTW3_FOUND is still FALSE.
+if (NOT FFTW3_FOUND)
+
+ # Include the helper macro for standard handling of results
+ include(FindPackageHandleStandardArgs)
+
+ # Look for the FFTW3 header. Users can help by setting FFTW3_DIR or
+ # by making sure the header is somewhere in the default search paths.
+ find_path(FFTW3_INCLUDE_DIR
+ NAMES fftw3.h
+ HINTS ENV FFTW3_DIR # WHAT MORE hints?
+ PATH_SUFFIXES include
+ )
+
+ # Look for the FFTW3 library. Allow FFTW3_DIR to point to its prefix.
+ find_library(FFTW3_LIBRARY
+ NAMES fftw3
+ HINTS ENV FFTW3_DIR # WHAT MORE hints?
+ PATH_SUFFIXES lib
+ )
+
+ # Standard handling macro: sets FFTW3_FOUND if successful
+ find_package_handle_standard_args(FFTW3
+ REQUIRED_VARS FFTW3_LIBRARY FFTW3_INCLUDE_DIR
+ )
+
+ # If we did find FFTW3, but no imported target exists yet,
+ # create our own IMPORTED target so downstream code can use:
+ # target_link_libraries(myprog PRIVATE FFTW3::fftw3)
+ if (FFTW3_FOUND AND NOT TARGET FFTW3::fftw3)
+ add_library(FFTW3::fftw3 UNKNOWN IMPORTED)
+ set_target_properties(FFTW3::fftw3 PROPERTIES
+ IMPORTED_LOCATION "${FFTW3_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIR}"
+ # HEY no INTERFACE_LINK_LIBRARIES ?
+ )
+ endif()
+endif()
+
+if (FFTW3_FOUND)
+ message(STATUS "Using FFTW3: ${FFTW3_LIBRARY}")
+else()
+ message(STATUS "FFTW3 not found")
+endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-12 00:34:26
|
Revision: 7408
http://sourceforge.net/p/teem/code/7408
Author: kindlmann
Date: 2025-09-12 00:34:21 +0000 (Fri, 12 Sep 2025)
Log Message:
-----------
improving description of role of LEVMAR in Teem
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-12 00:13:37 UTC (rev 7407)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-12 00:34:21 UTC (rev 7408)
@@ -101,7 +101,7 @@
set(_Teem_dep_doc_PNG "Enable nrrd support for PNG format images")
set(_Teem_dep_doc_BZIP2 "Enable nrrd support for bzip2 data encoding")
set(_Teem_dep_doc_PTHREAD "Enable hoover support for multi-threaded rendering")
-set(_Teem_dep_doc_LEVMAR "Build with levmar for better elf and ten")
+set(_Teem_dep_doc_LEVMAR "Build with levmar for better ten and elf")
set(_Teem_dep_doc_FFTW3 "Build with fftw3 to enable nrrdFFT() and `unu fft`")
# Whether to default to DEP being ON or OFF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-12 00:13:40
|
Revision: 7407
http://sourceforge.net/p/teem/code/7407
Author: kindlmann
Date: 2025-09-12 00:13:37 +0000 (Fri, 12 Sep 2025)
Log Message:
-----------
tweaking punctuation for version history
Modified Paths:
--------------
teem/trunk/LICENSE.txt
Modified: teem/trunk/LICENSE.txt
===================================================================
--- teem/trunk/LICENSE.txt 2025-09-11 07:33:27 UTC (rev 7406)
+++ teem/trunk/LICENSE.txt 2025-09-12 00:13:37 UTC (rev 7407)
@@ -3,9 +3,9 @@
Version 1.1, Sep 10 2025
Copyright (c) 2005, 2025 Gordon Kindlmann
- (version history:
+ [version history:
Sep 10 2025 Version 1.1: fixed FSF address
- Nov 6 2005 Version 1: original version)
+ Nov 6 2005 Version 1: original version]
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-11 07:33:29
|
Revision: 7406
http://sourceforge.net/p/teem/code/7406
Author: kindlmann
Date: 2025-09-11 07:33:27 +0000 (Thu, 11 Sep 2025)
Log Message:
-----------
rewinding this back to 2015's r6232, awaiting a more coordinate transition to the v2 cmake files
Modified Paths:
--------------
teem/trunk/CMake/FindFFTW3.cmake
Modified: teem/trunk/CMake/FindFFTW3.cmake
===================================================================
--- teem/trunk/CMake/FindFFTW3.cmake 2025-09-11 07:11:02 UTC (rev 7405)
+++ teem/trunk/CMake/FindFFTW3.cmake 2025-09-11 07:33:27 UTC (rev 7406)
@@ -1,76 +1,22 @@
-#
-# 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/>.
-#
-# Even though CMake already has a built-in FindFFTW3.cmake, it assumes that fftw3 was
-# installed locally via CMake, but that's not what e.g. (mac) brew or (linux) apt
-# actually does, so find_package(FFTW3) can succeed but is not able to define imported
-# targets for use with target_link_libraries(FFTW3::fftw3) This is a long-standing issue:
-# https://github.com/FFTW/fftw3/issues/130
-# and there must be various solutions out there, since ChatGPT basically wrote the code
-# below (and is characterically unable to provide a citation for similarly simple but
-# working code online)
+find_path(FFTW3_INCLUDE_DIR fftw3.h
+ /usr/local/include
+ /usr/include
+)
-# TODO: handle the various variants for different precisions
-# See FindFFTW3-multiprec.cmake for inspiration
+find_library(FFTW3_LIBRARY fftw3
+ /usr/lib
+ /usr/local/lib
+)
-# NOTE: If a working FFTW3Config.cmake is found, it will define
-# FFTW3::fftw3 for us already, so we don’t have to do anything else.
-# This fallback only runs when FFTW3_FOUND is still FALSE.
-if (NOT FFTW3_FOUND)
+set(FFTW3_FOUND FALSE)
+if(FFTW3_INCLUDE_DIR AND FFTW3_LIBRARY)
+ set(FFTW3_LIBRARIES ${FFTW3_LIBRARY} )
+ set(FFTW3_FOUND TRUE)
+endif()
- # Include the helper macro for standard handling of results
- include(FindPackageHandleStandardArgs)
-
- # Look for the FFTW3 header. Users can help by setting FFTW3_DIR or
- # by making sure the header is somewhere in the default search paths.
- find_path(FFTW3_INCLUDE_DIR
- NAMES fftw3.h
- HINTS ENV FFTW3_DIR
- PATH_SUFFIXES include
+mark_as_advanced(
+ FFTW3_INCLUDE_DIR
+ FFTW3_LIBRARIES
+ FFTW3_FOUND
)
-
- # Look for the FFTW3 library. Allow FFTW3_DIR to point to its prefix.
- find_library(FFTW3_LIBRARY
- NAMES fftw3
- HINTS ENV FFTW3_DIR
- PATH_SUFFIXES lib
- )
-
- # Standard handling macro: sets FFTW3_FOUND if the above succeeded
- find_package_handle_standard_args(FFTW3
- REQUIRED_VARS FFTW3_LIBRARY FFTW3_INCLUDE_DIR
- )
-
- # If we did find FFTW3, but no imported target exists yet,
- # create our own IMPORTED target so downstream code can use:
- # target_link_libraries(myprog PRIVATE FFTW3::fftw3)
- if (FFTW3_FOUND AND NOT TARGET FFTW3::fftw3)
- add_library(FFTW3::fftw3 UNKNOWN IMPORTED)
- set_target_properties(FFTW3::fftw3 PROPERTIES
- IMPORTED_LOCATION "${FFTW3_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIR}"
- )
- endif()
-endif()
-
-if (FFTW3_FOUND)
- message(STATUS "Using FFTW3: ${FFTW3_LIBRARY}")
-else()
- message(STATUS "FFTW3 not found")
-endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-11 07:11:05
|
Revision: 7405
http://sourceforge.net/p/teem/code/7405
Author: kindlmann
Date: 2025-09-11 07:11:02 +0000 (Thu, 11 Sep 2025)
Log Message:
-----------
added tend lmdemo command as self-contained demo of levmar
Modified Paths:
--------------
teem/trunk/src/ten/CMakeLists-v2.txt
teem/trunk/src/ten/GNUmakefile
teem/trunk/src/ten/privateTen.h
teem/trunk/src/ten/ten.h
Added Paths:
-----------
teem/trunk/src/ten/tendLmdemo.c
Modified: teem/trunk/src/ten/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/ten/CMakeLists-v2.txt 2025-09-11 01:13:23 UTC (rev 7404)
+++ teem/trunk/src/ten/CMakeLists-v2.txt 2025-09-11 07:11:02 UTC (rev 7405)
@@ -9,9 +9,10 @@
tendEllipse.c tendEpireg.c tendEstim.c tendEval.c tendEvaladd.c tendEvalclamp.c
tendEvalmult.c tendEvalpow.c tendEvec.c tendEvecrgb.c tendEvq.c tendExp.c
tendExpand.c tendFiber.c tendFlotsam.c tendGlyph.c tendGrads.c tendHelix.c
- tendLog.c tendMake.c tendMconv.c tendMfit.c tendMsim.c tendNorm.c tendPoint.c
- tendSatin.c tendShrink.c tendSim.c tendSlice.c tendSten.c tendTconv.c
- tendTriple.c tendUnmf.c tenDwiGage.c tenGage.c tenModel.c tensor.c triple.c
+ tendLmdemo.c tendLog.c tendMake.c tendMconv.c tendMfit.c tendMsim.c tendNorm.c
+ tendPoint.c tendSatin.c tendShrink.c tendSim.c tendSlice.c tendSten.c
+ tendTconv.c tendTriple.c tendUnmf.c tenDwiGage.c tenGage.c tenModel.c tensor.c
+ triple.c
# private header
privateTen.h
PUBLIC_HEADERS
Modified: teem/trunk/src/ten/GNUmakefile
===================================================================
--- teem/trunk/src/ten/GNUmakefile 2025-09-11 01:13:23 UTC (rev 7404)
+++ teem/trunk/src/ten/GNUmakefile 2025-09-11 07:11:02 UTC (rev 7405)
@@ -55,9 +55,10 @@
tendEllipse.c tendEpireg.c tendEstim.c tendEval.c tendEvaladd.c tendEvalclamp.c \
tendEvalmult.c tendEvalpow.c tendEvec.c tendEvecrgb.c tendEvq.c tendExp.c \
tendExpand.c tendFiber.c tendFlotsam.c tendGlyph.c tendGrads.c tendHelix.c \
- tendLog.c tendMake.c tendMconv.c tendMfit.c tendMsim.c tendNorm.c tendPoint.c \
- tendSatin.c tendShrink.c tendSim.c tendSlice.c tendSten.c tendTconv.c \
- tendTriple.c tendUnmf.c tenDwiGage.c tenGage.c tenModel.c tensor.c triple.c \
+ tendLmdemo.c tendLog.c tendMake.c tendMconv.c tendMfit.c tendMsim.c tendNorm.c \
+ tendPoint.c tendSatin.c tendShrink.c tendSim.c tendSlice.c tendSten.c \
+ tendTconv.c tendTriple.c tendUnmf.c tenDwiGage.c tenGage.c tenModel.c tensor.c \
+ triple.c \
)
# tendCalc.o nixed
$(L).Test = roistat tg tt tem rotedge tsoid odf-hist to tensorDotDat \
Modified: teem/trunk/src/ten/privateTen.h
===================================================================
--- teem/trunk/src/ten/privateTen.h 2025-09-11 01:13:23 UTC (rev 7404)
+++ teem/trunk/src/ten/privateTen.h 2025-09-11 07:11:02 UTC (rev 7405)
@@ -24,6 +24,9 @@
#define TEND_CMD(name, info) \
const unrrduCmd tend_##name##Cmd = {#name, info, tend_##name##Main, AIR_FALSE}
+#define TEND_CMD_HIDE(name, info) \
+ const unrrduCmd tend_##name##Cmd = {#name, info, tend_##name##Main, AIR_TRUE}
+
/* USAGE, PARSE: both copied verbatim from unrrdu/privateUnrrdu.h, but
** then some hacking was added . . .
*/
Modified: teem/trunk/src/ten/ten.h
===================================================================
--- teem/trunk/src/ten/ten.h 2025-09-11 01:13:23 UTC (rev 7404)
+++ teem/trunk/src/ten/ten.h 2025-09-11 07:11:02 UTC (rev 7405)
@@ -1709,7 +1709,8 @@
F(expand) \
F(shrink) \
F(bfit) \
- F(satin)
+ F(satin) \
+ F(lmdemo)
TEND_MAP(TEND_DECLARE)
TEN_EXPORT const unrrduCmd *const tendCmdList[];
TEN_EXPORT const hestCB *const tendFiberStopCB;
Added: teem/trunk/src/ten/tendLmdemo.c
===================================================================
--- teem/trunk/src/ten/tendLmdemo.c (rev 0)
+++ teem/trunk/src/ten/tendLmdemo.c 2025-09-11 07:11:02 UTC (rev 7405)
@@ -0,0 +1,269 @@
+/*
+ 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/>.
+*/
+
+#include <assert.h>
+
+#include "ten.h"
+#include "privateTen.h"
+#if TEEM_LEVMAR
+# include <levmar.h>
+#endif
+
+#if TEEM_LEVMAR
+# define INFO "Demonstrates using levmar "
+static const char *_tend_lmdemoInfoL
+ = (INFO " https://users.ics.forth.gr/~lourakis/levmar/ implementation of "
+ "Levenberg-Marquardt (LM), with an example of fitting a polynomial "
+ "to noisy data. Also demonstrates the new airJSFRand way of generating "
+ "pseudo-random numbers.");
+// AND, this is the first file in Teem that tries using C99 features,
+// like these C++-style comments, and variables declared as you go, and __func__
+// which makes writing C a little less annoying
+#else
+# define INFO "(no levmar => cannot run) Demo of levmar"
+static const char *_tend_lmdemoInfoL
+ = (INFO ". Because this Teem was built without the "
+ "https://users.ics.forth.gr/~lourakis/levmar/ implementation of "
+ "Levenberg-Marquardt (LM), this demo does not do anything useful. Try "
+ "CMake-configuring with Teem_USE_LEVMAR, or "
+ "GNUmake-ing with environment variable TEEM_LEVMAR.");
+#endif
+
+/* excerpts from levmar.h:
+
+-- double precision LM, with & without Jacobian --
+-- unconstrained minimization --
+extern int dlevmar_der(
+ void (*func)(double *p, double *hx, int m, int n, void *adata),
+ void (*jacf)(double *p, double *j, int m, int n, void *adata),
+ double *p, double *x, int m, int n, int itmax, double *opts,
+ double *info, double *work, double *covar, void *adata);
+
+extern int dlevmar_dif(
+ void (*func)(double *p, double *hx, int m, int n, void *adata),
+ double *p, double *x, int m, int n, int itmax, double *opts,
+ double *info, double *work, double *covar, void *adata);
+
+-- box-constrained minimization --
+extern int dlevmar_bc_der(
+ void (*func)(double *p, double *hx, int m, int n, void *adata),
+ void (*jacf)(double *p, double *j, int m, int n, void *adata),
+ double *p, double *x, int m, int n, double *lb, double *ub, double *dscl,
+ int itmax, double *opts, double *info, double *work, double *covar, void *adata);
+
+extern int dlevmar_bc_dif(
+ void (*func)(double *p, double *hx, int m, int n, void *adata),
+ double *p, double *x, int m, int n, double *lb, double *ub, double *dscl,
+ int itmax, double *opts, double *info, double *work, double *covar, void *adata);
+*/
+
+static double
+polyEval(const double *pc, unsigned int M, double xx) {
+ double ret = 0;
+ for (unsigned int ci = M; ci-- > 0;) { // ci = coefficient index, with "-->" operator
+ ret = ret * xx + pc[ci];
+ }
+ return ret;
+}
+
+// the bag-of-state struct passed via "adata" arg for additional data
+typedef struct {
+ double *tp; // ground truth polynomial coefficients (should really be const)
+ unsigned int M, // # parameters to estimate = length of tp[]
+ N; // # of samples in interval
+ double xmm[2]; // interval in which we do N cell-centered samples
+ int verb; // verbosity
+ double *pf; // the polynomial as currently being fitted
+} bagOstate;
+
+/*
+funcPredict: the "func" callback for levmar functions
+Forward modeling or prediction callback for both dlevmar_der and dlevmar_dif, which
+the https://users.ics.forth.gr/~lourakis/levmar/ docs describe as:
+ functional relation describing measurements.
+ A pf[] \in R^mm yields a \hat{y} \in R^nn
+except that we've done some renaming:
+ "p" (parameter vector) --> "pf" current polynomial we're trying
+ "m" (# parameters) --> "mm" to be less annoying
+ "hx" (predicted data) --> "hy" predicted y=pf(x) polynomial values
+ "n" (# data points) --> "nn" to be less annoying
+*/
+static void
+funcPredict(double *pf, double *hy, int mm, int nn, void *adata) {
+ bagOstate *bag = (bagOstate *)adata;
+ if (bag->verb > 2) {
+ printf("%s: called at pf =", __func__);
+ for (int pi = 0; pi < mm; pi++) {
+ printf(" %g", pf[pi]);
+ }
+ printf("\n");
+ }
+ assert(AIR_UINT(mm) == bag->M);
+ assert(AIR_UINT(nn) == bag->N);
+ for (int si = 0; si < nn; si++) { // si = sample index
+ double sx = NRRD_CELL_POS(bag->xmm[0], bag->xmm[1], nn, si);
+ hy[si] = polyEval(pf, mm, sx);
+ }
+ return;
+}
+
+// Synthesize data and store in ndata
+static void
+dataSynth(Nrrd *ndata, const bagOstate *bag, double rnStdv, unsigned int rnSeed,
+ airArray *mop) {
+ double *data = AIR_CAST(double *, ndata->data);
+ airJSFRand *jsf = NULL;
+ if (rnStdv > 0) {
+ jsf = airJSFRandNew(rnSeed);
+ airMopAdd(mop, jsf, (airMopper)airJSFRandNix, airMopAlways);
+ }
+ unsigned int N = AIR_UINT(ndata->axis[0].size); // N = # of data points
+ assert(N == bag->N);
+ for (unsigned int si = 0; si < N; si++) { // si = sample index
+ double sx = NRRD_CELL_POS(bag->xmm[0], bag->xmm[1], N, si);
+ double val = polyEval(bag->tp, bag->M, sx);
+ double noise = jsf ? rnStdv * airJSFRandNormal_d(jsf) : 0;
+ /*
+ if (bag->verb > 1) {
+ printf("%s: data[%u] = poly(%g) + noise = %g + %g = %g\n", __func__, si, sx, val,
+ noise, val + noise);
+ }
+ */
+ data[si] = val + noise;
+ }
+ ndata->axis[0].min = bag->xmm[0];
+ ndata->axis[0].max = bag->xmm[1];
+ ndata->axis[0].center = nrrdCenterCell;
+ return;
+}
+
+static void
+doLM(Nrrd *ndata, int itmax, bagOstate *bag) {
+ int iters = -1;
+ AIR_UNUSED(ndata);
+ AIR_UNUSED(itmax);
+#if TEEM_LEVMAR
+ double *ym = (double *)(ndata->data); // measured y values
+ double info[LM_INFO_SZ];
+ /* extern int dlevmar_dif(
+ void (*func)(double *p, double *hx, int m, int n, void *adata),
+ double *p, double *x, int m, int n, int itmax, double *opts,
+ double *info, double *work, double *covar, void *adata); */
+ iters = dlevmar_dif(funcPredict, //
+ bag->pf, ym, (int)(bag->M), (int)(bag->N), itmax, NULL, //
+ info, NULL, NULL, AIR_VOIDP(bag));
+#else
+ printf("%s: not calling dlevmar_dif() because we don't have TEEM_LEVMAR\n", __func__);
+#endif
+ printf("%s: after %d iters, ended up at pf =", __func__, iters);
+ for (unsigned int pi = 0; pi < bag->M; pi++) {
+ printf(" %g", bag->pf[pi]);
+ }
+ printf("\n");
+ return;
+}
+
+static int
+tend_lmdemoMain(int argc, const char **argv, const char *me, hestParm *hparm) {
+ int pret;
+ hestOpt *hopt = NULL;
+ char *perr, *err;
+
+ bagOstate bag[1]; // allocate one bag-o-state; can access member m with bag->m
+ hestOptAdd_Nv_Double(&hopt, "tp", "true poly coeffs", 1, 10, &(bag->tp), "1",
+ "coefficients of (ground-truth) polynomial to sample, to "
+ "synthsize the data to later fit. \"-tp A B C\" means "
+ "A + Bx + Cx^2. These coefficients are the _M_ "
+ "parameters that the LM method seeks to recover",
+ &(bag->M));
+ hestOptAdd_1_UInt(&hopt, "N", "# points", &(bag->N), "42",
+ "How many times to sample polynomial to generate data _N_ data "
+ "points. Part of the purpose of this demo is to connect the "
+ "stupid single-letter variable names used in the levmar docs "
+ "to this concrete example.");
+ hestOptAdd_2_Double(&hopt, "xmm", "xmin xmax", bag->xmm, "-1 1",
+ "polynomial will be evaluated at _N_ cell-centered points along "
+ "this interval on X axis");
+ double rnStdv;
+ hestOptAdd_1_Double(&hopt, "r", "noise", &rnStdv, "0",
+ "Gaussian noise of this stdv will be added to polynomial "
+ "evaluations to generate data");
+ unsigned int rnSeed;
+ hestOptAdd_1_UInt(&hopt, "e", "rng sEed", &rnSeed, "67",
+ "Seed for random number generator");
+ char *outS;
+ hestOptAdd_1_String(&hopt, "o", "data out", &outS, NULL,
+ "If given a filename here, will save out synthetic data");
+ int itmax;
+ hestOptAdd_1_Int(&hopt, "im", "itmax", &itmax, "100", "cap on # iterations");
+ hestOptAdd_1_Int(&hopt, "v", "verbosity", &(bag->verb), "1", "verbosity level");
+
+ airArray *mop = airMopNew();
+ airMopAdd(mop, hopt, (airMopper)hestOptFree, airMopAlways);
+ USAGE(_tend_lmdemoInfoL);
+ JUSTPARSE(_tend_lmdemoInfoL);
+ airMopAdd(mop, hopt, (airMopper)hestParseFree, airMopAlways);
+ if (!(bag->N >= 1)) {
+ fprintf(stderr, "%s: Need at least N=1 datapoint, not N=%u\n", me, bag->N);
+ airMopError(mop);
+ return 1;
+ }
+ if (!(bag->N >= bag->M)) {
+ printf("%s: WARNING: have only N=%u datapoints to recover M=%u parameters; "
+ " this may not end well.\n",
+ me, bag->M, bag->N);
+ }
+ Nrrd *ndata = nrrdNew();
+ airMopAdd(mop, ndata, (airMopper)nrrdNuke, airMopAlways);
+ if (nrrdMaybeAlloc_va(ndata, nrrdTypeDouble, 1, bag->N)) {
+ airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
+ fprintf(stderr, "%s: trouble allocating data:\n%s\n", me, err);
+ airMopError(mop);
+ return 1;
+ }
+ // synthesize the data and maybe save it out
+ dataSynth(ndata, bag, rnStdv, rnSeed, mop);
+ if (airStrlen(outS)) {
+ NrrdIoState *nio = nrrdIoStateNew();
+ airMopAdd(mop, nio, (airMopper)nrrdIoStateNix, airMopAlways);
+ nio->bareText = AIR_FALSE;
+ nio->moreThanFloatInText = AIR_TRUE;
+ if (nrrdSave(outS, ndata, nio)) {
+ airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
+ fprintf(stderr, "%s: trouble writing:\n%s\n", me, err);
+ airMopError(mop);
+ return 1;
+ }
+ }
+
+ // prepare for LM call
+ bag->pf = AIR_MALLOC(bag->M, double);
+ assert(bag->pf);
+ airMopAdd(mop, bag->pf, airFree, airMopAlways);
+ // initialize parms that will be fitted
+ for (unsigned int pi = 0; pi < bag->M; pi++) {
+ bag->pf[pi] = 0;
+ }
+ AIR_UNUSED(funcPredict); // to quiet warnings if not levmar
+ doLM(ndata, itmax, bag);
+
+ airMopOkay(mop);
+ return 0;
+}
+TEND_CMD(lmdemo, INFO);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-11 01:13:24
|
Revision: 7404
http://sourceforge.net/p/teem/code/7404
Author: kindlmann
Date: 2025-09-11 01:13:23 +0000 (Thu, 11 Sep 2025)
Log Message:
-----------
now installing LICENSE file
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-11 01:08:39 UTC (rev 7403)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-11 01:13:23 UTC (rev 7404)
@@ -17,7 +17,7 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# Teem/CMakeLists.txt Version 10.97
+# Teem/CMakeLists.txt Version 10.98
# This CMakeLists.txt describes a Teem package that contains:
# (1) a library ("libteem" on unix) and
@@ -548,6 +548,11 @@
DESTINATION ${CONFIG_INSTALL_DIR}
)
+# Install copy of the LICENSE.txt as LICENSE
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/Teem
+ RENAME LICENSE)
+
###-------------------------------------------------------------------------------------
# For non-CMake consumers: create teem.pc for pkg-config, and teem-config script
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-11 01:08:43
|
Revision: 7403
http://sourceforge.net/p/teem/code/7403
Author: kindlmann
Date: 2025-09-11 01:08:39 +0000 (Thu, 11 Sep 2025)
Log Message:
-----------
fixing formatting of version history
Modified Paths:
--------------
teem/trunk/LICENSE.txt
Modified: teem/trunk/LICENSE.txt
===================================================================
--- teem/trunk/LICENSE.txt 2025-09-11 01:07:15 UTC (rev 7402)
+++ teem/trunk/LICENSE.txt 2025-09-11 01:08:39 UTC (rev 7403)
@@ -3,9 +3,9 @@
Version 1.1, Sep 10 2025
Copyright (c) 2005, 2025 Gordon Kindlmann
-(version history:
- Sep 10 2025: Version 1.1: fixed FSF address
- Nov 6 2005: Version 1, original version)
+ (version history:
+ Sep 10 2025 Version 1.1: fixed FSF address
+ Nov 6 2005 Version 1: original version)
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-11 01:07:16
|
Revision: 7402
http://sourceforge.net/p/teem/code/7402
Author: kindlmann
Date: 2025-09-11 01:07:15 +0000 (Thu, 11 Sep 2025)
Log Message:
-----------
fixing FSF address
Modified Paths:
--------------
teem/trunk/LICENSE.txt
Modified: teem/trunk/LICENSE.txt
===================================================================
--- teem/trunk/LICENSE.txt 2025-09-10 23:51:42 UTC (rev 7401)
+++ teem/trunk/LICENSE.txt 2025-09-11 01:07:15 UTC (rev 7402)
@@ -1,8 +1,12 @@
Simple Library Usage License
- Version 1, Nov 6 2005
- Copyright (c) 2005 Gordon Kindlmann
+ Version 1.1, Sep 10 2025
+ Copyright (c) 2005, 2025 Gordon Kindlmann
+(version history:
+ Sep 10 2025: Version 1.1: fixed FSF address
+ Nov 6 2005: Version 1, original version)
+
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
@@ -20,9 +24,8 @@
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, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA
+License along with this library; if not, see
+<https://www.gnu.org/licenses/>.
EXCEPTION NOTICE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 23:51:43
|
Revision: 7401
http://sourceforge.net/p/teem/code/7401
Author: kindlmann
Date: 2025-09-10 23:51:42 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
tweaks
Modified Paths:
--------------
teem/trunk/UseTeemCMakeDemo/00-INFO.txt
teem/trunk/UseTeemCMakeDemo/CMakeLists-v2.txt
Modified: teem/trunk/UseTeemCMakeDemo/00-INFO.txt
===================================================================
--- teem/trunk/UseTeemCMakeDemo/00-INFO.txt 2025-09-10 23:37:05 UTC (rev 7400)
+++ teem/trunk/UseTeemCMakeDemo/00-INFO.txt 2025-09-10 23:51:42 UTC (rev 7401)
@@ -12,28 +12,32 @@
should show `bin`, `include`, `lib`.
-2) The following will create a `build` subdirectory right here where testio.c
-is, doing the configure and generate steps of CMake:
+2) The following will create a `localbuild` subdirectory right here where
+testio.c is, doing the configure and generate steps of CMake:
- cmake -S . -B build \
+ cmake -S . -B buildhere \
-DCMAKE_PREFIX_PATH=$TEEM_DIR \
- -DCMAKE_INSTALL_PREFIX=install
+ -DCMAKE_INSTALL_PREFIX=installhere
The `.` argument to `cmake -S` is the path to the source directory, and the
-`build` argument to `cmake -B` is the path to the new testio build directory.
-After the `find_package` in ./CMakeLists.txt runs, CMake will set its own
-`Teem_DIR` variable to $TEEM_DIR. The `install` local (relative) path will be
-the subdirectory that CMake will install into later.
+`buildhere` argument to `cmake -B` is the path of the to-be-created directory
+to will contain all of CMake's work and files for building this
+"DemoOfUsingTeem" project (named by the `project(DemoOfUsingTeem LANGUAGES C)`
+line in CMakeLists.txt). After the `find_package` in ./CMakeLists.txt runs,
+CMake will set its own `Teem_DIR` variable to $TEEM_DIR. The `installhere` path
+is where CMake will install things in when asked to install.
3) To build in a way that is agnostic w.r.t. build system:
- cmake --build build
+ cmake --build buildhere
-which means: run the "build" step (first "--build") in the local `build`
-subdirectory (second "build"). Or if you like running make:
+which means: run the "build" step (first "--build") in the `buildhere`
+directory. Or if you like running make directly:
- (cd build; make)
+ (cd buildhere; make)
4) To install:
- cmake --install build
+ cmake --install buildhere
+
+which runs CMake's "install" process on whatever has been built in "buildhere"
Modified: teem/trunk/UseTeemCMakeDemo/CMakeLists-v2.txt
===================================================================
--- teem/trunk/UseTeemCMakeDemo/CMakeLists-v2.txt 2025-09-10 23:37:05 UTC (rev 7400)
+++ teem/trunk/UseTeemCMakeDemo/CMakeLists-v2.txt 2025-09-10 23:51:42 UTC (rev 7401)
@@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.14)
# Set (demo) project name, initialize compiler detection and compiler flags
-project(TestNrrdIO LANGUAGES C)
+project(DemoOfUsingTeem LANGUAGES C)
# Find Teem (must be installed in CMAKE_PREFIX_PATH or default system paths)
find_package(Teem REQUIRED)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 23:37:06
|
Revision: 7400
http://sourceforge.net/p/teem/code/7400
Author: kindlmann
Date: 2025-09-10 23:37:05 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
rename
Added Paths:
-----------
teem/trunk/UseTeemCMakeDemo/00-INFO.txt
Removed Paths:
-------------
teem/trunk/UseTeemCMakeDemo/00-Readme.txt
Copied: teem/trunk/UseTeemCMakeDemo/00-INFO.txt (from rev 7399, teem/trunk/UseTeemCMakeDemo/00-Readme.txt)
===================================================================
--- teem/trunk/UseTeemCMakeDemo/00-INFO.txt (rev 0)
+++ teem/trunk/UseTeemCMakeDemo/00-INFO.txt 2025-09-10 23:37:05 UTC (rev 7400)
@@ -0,0 +1,39 @@
+This is a simple demo of how another C program can use CMake to link
+with a CMake-built Teem (it also reflects how I (GLK) am belatedly
+understanding how CMake works).
+
+Steps:
+
+1) Set TEEM_DIR to the path to where CMake installed Teem. There should be
+`bin`, `include`, `lib`, subdirectories, and the `lib/cmake` will record how
+CMake built Teem. Then:
+
+ ls $TEEM_DIR
+
+should show `bin`, `include`, `lib`.
+
+2) The following will create a `build` subdirectory right here where testio.c
+is, doing the configure and generate steps of CMake:
+
+ cmake -S . -B build \
+ -DCMAKE_PREFIX_PATH=$TEEM_DIR \
+ -DCMAKE_INSTALL_PREFIX=install
+
+The `.` argument to `cmake -S` is the path to the source directory, and the
+`build` argument to `cmake -B` is the path to the new testio build directory.
+After the `find_package` in ./CMakeLists.txt runs, CMake will set its own
+`Teem_DIR` variable to $TEEM_DIR. The `install` local (relative) path will be
+the subdirectory that CMake will install into later.
+
+3) To build in a way that is agnostic w.r.t. build system:
+
+ cmake --build build
+
+which means: run the "build" step (first "--build") in the local `build`
+subdirectory (second "build"). Or if you like running make:
+
+ (cd build; make)
+
+4) To install:
+
+ cmake --install build
Deleted: teem/trunk/UseTeemCMakeDemo/00-Readme.txt
===================================================================
--- teem/trunk/UseTeemCMakeDemo/00-Readme.txt 2025-09-10 19:32:15 UTC (rev 7399)
+++ teem/trunk/UseTeemCMakeDemo/00-Readme.txt 2025-09-10 23:37:05 UTC (rev 7400)
@@ -1,39 +0,0 @@
-This is a simple demo of how another C program can use CMake to link
-with a CMake-built Teem (it also reflects how I (GLK) am belatedly
-understanding how CMake works).
-
-Steps:
-
-1) Set TEEM_DIR to the path to where CMake installed Teem. There should be
-`bin`, `include`, `lib`, subdirectories, and the `lib/cmake` will record how
-CMake built Teem. Then:
-
- ls $TEEM_DIR
-
-should show `bin`, `include`, `lib`.
-
-2) The following will create a `build` subdirectory right here where testio.c
-is, doing the configure and generate steps of CMake:
-
- cmake -S . -B build \
- -DCMAKE_PREFIX_PATH=$TEEM_DIR \
- -DCMAKE_INSTALL_PREFIX=install
-
-The `.` argument to `cmake -S` is the path to the source directory, and the
-`build` argument to `cmake -B` is the path to the new testio build directory.
-After the `find_package` in ./CMakeLists.txt runs, CMake will set its own
-`Teem_DIR` variable to $TEEM_DIR. The `install` local (relative) path will be
-the subdirectory that CMake will install into later.
-
-3) To build in a way that is agnostic w.r.t. build system:
-
- cmake --build build
-
-which means: run the "build" step (first "--build") in the local `build`
-subdirectory (second "build"). Or if you like running make:
-
- (cd build; make)
-
-4) To install:
-
- cmake --install build
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 19:32:17
|
Revision: 7399
http://sourceforge.net/p/teem/code/7399
Author: kindlmann
Date: 2025-09-10 19:32:15 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
updating Python/CFFI code for -v2 CMakeLists.txt files
Modified Paths:
--------------
teem/trunk/python/cffi/biffdata/alan.csv
teem/trunk/python/cffi/biffdata/bane.csv
teem/trunk/python/cffi/biffdata/coil.csv
teem/trunk/python/cffi/biffdata/dye.csv
teem/trunk/python/cffi/biffdata/echo.csv
teem/trunk/python/cffi/biffdata/ell.csv
teem/trunk/python/cffi/biffdata/gage.csv
teem/trunk/python/cffi/biffdata/hoover.csv
teem/trunk/python/cffi/biffdata/limn.csv
teem/trunk/python/cffi/biffdata/meet.csv
teem/trunk/python/cffi/biffdata/mite.csv
teem/trunk/python/cffi/biffdata/moss.csv
teem/trunk/python/cffi/biffdata/nrrd.csv
teem/trunk/python/cffi/biffdata/pull.csv
teem/trunk/python/cffi/biffdata/push.csv
teem/trunk/python/cffi/biffdata/seek.csv
teem/trunk/python/cffi/biffdata/ten.csv
teem/trunk/python/cffi/cdef/cdef_air.h
teem/trunk/python/cffi/cdef/cdef_nrrd.h
teem/trunk/python/cffi/teem.py
teem/trunk/src/_util/gen_biffdata.py
teem/trunk/src/air/CMakeLists-v2.txt
Modified: teem/trunk/python/cffi/biffdata/alan.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/alan.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/alan.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
alanUpdate,int,1,0,alan,alan/coreAlan.c:58
alanInit,int,1,0,alan,alan/coreAlan.c:97
alanRun,int,1,0,alan,alan/coreAlan.c:451
Modified: teem/trunk/python/cffi/biffdata/bane.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/bane.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/bane.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
baneClipNew,baneClip *,NULL,0,bane,bane/clip.c:100
baneClipAnswer,int,1,0,bane,bane/clip.c:150
baneClipCopy,baneClip *,NULL,0,bane,bane/clip.c:165
Modified: teem/trunk/python/cffi/biffdata/coil.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/coil.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/coil.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
coilStart,int,1,0,coil,coil/coreCoil.c:285
coilIterate,int,1,0,coil,coil/coreCoil.c:360
coilFinish,int,1,0,coil,coil/coreCoil.c:405
Modified: teem/trunk/python/cffi/biffdata/dye.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/dye.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/dye.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,3 +1,3 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
dyeConvert,int,1,0,dye,dye/convertDye.c:349
dyeColorParse,int,1,0,dye,dye/methodsDye.c:183
Modified: teem/trunk/python/cffi/biffdata/echo.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/echo.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/echo.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
echoThreadStateInit,int,1,0,echo,echo/renderEcho.c:24
echoRTRenderCheck,int,1,0,echo,echo/renderEcho.c:132
echoRTRender,int,1,0,echo,echo/renderEcho.c:407
Modified: teem/trunk/python/cffi/biffdata/ell.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/ell.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/ell.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
ell_Nm_check,int,1,0,ell,ell/genmat.c:23
ell_Nm_tran,int,1,0,ell,ell/genmat.c:57
ell_Nm_mul,int,1,0,ell,ell/genmat.c:102
Modified: teem/trunk/python/cffi/biffdata/gage.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/gage.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/gage.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
gageContextCopy,gageContext *,NULL,0,gage,gage/ctx.c:86
gageKernelSet,int,1,0,gage,gage/ctx.c:197
gagePerVolumeAttach,int,1,0,gage,gage/ctx.c:396
@@ -7,6 +7,11 @@
gageDeconvolveSeparable,int,1,0,gage,gage/deconvolve.c:206
gageKindCheck,int,1,0,gage,gage/kind.c:31
gageKindVolumeCheck,int,1,0,gage,gage/kind.c:216
+gageOptimSigSet,int,1,0,gage,gage/optimsig.c:215
+gageOptimSigContextNew,gageOptimSigContext *,NULL,0,gage,gage/optimsig.c:309
+gageOptimSigCalculate,int,1,0,gage,gage/optimsig.c:1088
+gageOptimSigErrorPlot,int,1,0,gage,gage/optimsig.c:1160
+gageOptimSigErrorPlotSliding,int,1,0,gage,gage/optimsig.c:1251
gageVolumeCheck,int,1,0,gage,gage/pvl.c:34
gagePerVolumeNew,gagePerVolume *,NULL,0,gage,gage/pvl.c:55
gageQueryReset,int,1,0,gage,gage/pvl.c:259
@@ -38,8 +43,3 @@
gageStackBlurGet,int,1,0,gage,gage/stackBlur.c:1595
gageStackBlurManage,int,1,0,gage,gage/stackBlur.c:1696
gageUpdate,int,1,0,gage,gage/update.c:311
-gageOptimSigSet,int,1,0,gage,gage/optimsig.c:215
-gageOptimSigContextNew,gageOptimSigContext *,NULL,0,gage,gage/optimsig.c:309
-gageOptimSigCalculate,int,1,0,gage,gage/optimsig.c:1088
-gageOptimSigErrorPlot,int,1,0,gage,gage/optimsig.c:1160
-gageOptimSigErrorPlotSliding,int,1,0,gage,gage/optimsig.c:1251
Modified: teem/trunk/python/cffi/biffdata/hoover.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/hoover.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/hoover.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,3 +1,3 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
hooverContextCheck,int,1,0,hoover,hoover/methodsHoover.c:51
hooverRender,int,hooverErrInit,0,hoover,hoover/rays.c:357
Modified: teem/trunk/python/cffi/biffdata/limn.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/limn.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/limn.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
limnCameraUpdate,int,1,0,limn,limn/cam.c:31
limnCameraAspectSet,int,1,0,limn,limn/cam.c:128
limnCameraPathMake,int,1,0,limn,limn/cam.c:187
@@ -53,13 +53,6 @@
limnObjectPSDrawConcave,int,1,0,limn,limn/renderLimn.c:312
limnSplineNrrdEvaluate,int,1,0,limn,limn/splineEval.c:321
limnSplineSample,int,1,0,limn,limn/splineEval.c:359
-limnSplineTypeSpecNew,limnSplineTypeSpec *,NULL,0,limn,limn/splineMethods.c:23
-limnSplineNew,limnSpline *,NULL,0,limn,limn/splineMethods.c:122
-limnSplineNrrdCleverFix,int,1,0,limn,limn/splineMethods.c:247
-limnSplineCleverNew,limnSpline *,NULL,0,limn,limn/splineMethods.c:392
-limnSplineUpdate,int,1,0,limn,limn/splineMethods.c:420
-limnSplineTypeSpecParse,limnSplineTypeSpec *,NULL,0,limn,limn/splineMisc.c:220
-limnSplineParse,limnSpline *,NULL,0,limn,limn/splineMisc.c:276
limnCbfPointsNew,limnCbfPoints *,NULL,0,limn,limn/splineFit.c:175
limnCbfPointsCheck,int,1,0,limn,limn/splineFit.c:247
limnCbfCtxPrep,int,1,0,limn,limn/splineFit.c:518
@@ -68,6 +61,13 @@
limnCbfCorners,int,1,0,limn,limn/splineFit.c:1577
limnCbfMulti,int,1,0,limn,limn/splineFit.c:1779
limnCbfGo,int,1,0,limn,limn/splineFit.c:1897
+limnSplineTypeSpecNew,limnSplineTypeSpec *,NULL,0,limn,limn/splineMethods.c:23
+limnSplineNew,limnSpline *,NULL,0,limn,limn/splineMethods.c:122
+limnSplineNrrdCleverFix,int,1,0,limn,limn/splineMethods.c:247
+limnSplineCleverNew,limnSpline *,NULL,0,limn,limn/splineMethods.c:392
+limnSplineUpdate,int,1,0,limn,limn/splineMethods.c:420
+limnSplineTypeSpecParse,limnSplineTypeSpec *,NULL,0,limn,limn/splineMisc.c:220
+limnSplineParse,limnSpline *,NULL,0,limn,limn/splineMisc.c:276
limnObjectWorldHomog,int,1,0,limn,limn/transform.c:23
limnObjectFaceNormals,int,1,0,limn,limn/transform.c:45
limnObjectSpaceTransform,int,1,0,limn,limn/transform.c:208
Modified: teem/trunk/python/cffi/biffdata/meet.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/meet.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/meet.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
meetAirEnumAllCheck,int,1,0,meet,meet/enumall.c:214
meetNrrdKernelAllCheck,int,1,0,meet,meet/meetNrrd.c:234
meetPullVolCopy,meetPullVol *,NULL,0,meet,meet/meetPull.c:42
Modified: teem/trunk/python/cffi/biffdata/mite.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/mite.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/mite.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
miteSample,double,AIR_NAN,0,mite,mite/ray.c:149
miteRenderBegin,int,1,0,mite,mite/renderMite.c:61
miteShadeSpecParse,int,1,0,mite,mite/shade.c:67
Modified: teem/trunk/python/cffi/biffdata/moss.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/moss.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/moss.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
mossImageCheck,int,1,0,moss,moss/methodsMoss.c:72
mossImageAlloc,int,1,0,moss,moss/methodsMoss.c:93
mossSamplerImageSet,int,1,0,moss,moss/sampler.c:24
Modified: teem/trunk/python/cffi/biffdata/nrrd.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/nrrd.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/nrrd.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
nrrdArrayCompare,int,1,0,nrrd,nrrd/accessors.c:515
nrrdApply1DLut,int,1,0,nrrd,nrrd/apply1D.c:432
nrrdApplyMulti1DLut,int,1,0,nrrd,nrrd/apply1D.c:463
@@ -43,6 +43,9 @@
nrrdDeringRadialKernelSet,int,1,0,nrrd,nrrd/deringNrrd.c:268
nrrdDeringThetaKernelSet,int,1,0,nrrd,nrrd/deringNrrd.c:288
nrrdDeringExecute,int,1,0,nrrd,nrrd/deringNrrd.c:748
+nrrdFFTWWisdomRead,int,1,0,nrrd,nrrd/fftNrrd.c:32
+nrrdFFT,int,1,0,nrrd,nrrd/fftNrrd.c:88
+nrrdFFTWWisdomWrite,int,1,0,nrrd,nrrd/fftNrrd.c:285
nrrdCheapMedian,int,1,0,nrrd,nrrd/filt.c:405
nrrdDistanceL2,int,1,0,nrrd,nrrd/filt.c:812
nrrdDistanceL2Biased,int,1,0,nrrd,nrrd/filt.c:824
@@ -121,9 +124,6 @@
nrrdResampleRoundSet,int,1,0,nrrd,nrrd/resampleContext.c:499
nrrdResampleClampSet,int,1,0,nrrd,nrrd/resampleContext.c:516
nrrdResampleExecute,int,1,0,nrrd,nrrd/resampleContext.c:1451
-nrrdFFTWWisdomRead,int,1,0,nrrd,nrrd/fftNrrd.c:32
-nrrdFFT,int,1,0,nrrd,nrrd/fftNrrd.c:88
-nrrdFFTWWisdomWrite,int,1,0,nrrd,nrrd/fftNrrd.c:285
nrrdSimpleResample,int,1,0,nrrd,nrrd/resampleNrrd.c:49
nrrdSpatialResample,int,1,0,nrrd,nrrd/resampleNrrd.c:519
nrrdSpaceSet,int,1,0,nrrd,nrrd/simple.c:81
Modified: teem/trunk/python/cffi/biffdata/pull.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/pull.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/pull.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,14 +1,30 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
pullEnergyPlot,int,1,0,pull,pull/actionPull.c:230
pullBinProcess,int,1,0,pull,pull/actionPull.c:1104
pullGammaLearn,int,1,0,pull,pull/actionPull.c:1139
pullBinsPointAdd,int,1,0,pull,pull/binningPull.c:181
pullBinsPointMaybeAdd,int,1,0,pull,pull/binningPull.c:203
+pullCCFind,int,1,0,pull,pull/ccPull.c:28
+pullCCMeasure,int,1,0,pull,pull/ccPull.c:112
+pullCCSort,int,1,0,pull,pull/ccPull.c:207
pullOutputGetFilter,int,1,0,pull,pull/contextPull.c:379
pullOutputGet,int,1,0,pull,pull/contextPull.c:575
pullPropGet,int,1,0,pull,pull/contextPull.c:588
pullPositionHistoryNrrdGet,int,1,0,pull,pull/contextPull.c:766
pullPositionHistoryPolydataGet,int,1,0,pull,pull/contextPull.c:838
+pullStart,int,1,0,pull,pull/corePull.c:111
+pullFinish,int,1,0,pull,pull/corePull.c:166
+pullRun,int,1,0,pull,pull/corePull.c:333
+pullEnergySpecParse,int,1,0,pull,pull/energy.c:625
+pullInfoSpecAdd,int,1,0,pull,pull/infoPull.c:130
+pullInfoGet,int,1,0,pull,pull/infoPull.c:402
+pullInfoSpecSprint,int,1,0,pull,pull/infoPull.c:447
+pullInitRandomSet,int,1,0,pull,pull/initPull.c:107
+pullInitHaltonSet,int,1,0,pull,pull/initPull.c:125
+pullInitPointPerVoxelSet,int,1,0,pull,pull/initPull.c:144
+pullInitGivenPosSet,int,1,0,pull,pull/initPull.c:172
+pullInitLiveThreshUseSet,int,1,0,pull,pull/initPull.c:186
+pullInitUnequalShapesAllowSet,int,1,0,pull,pull/initPull.c:199
pullIterParmSet,int,1,0,pull,pull/parmPull.c:102
pullSysParmSet,int,1,0,pull,pull/parmPull.c:191
pullFlagSet,int,1,0,pull,pull/parmPull.c:270
@@ -19,33 +35,17 @@
pullCallbackSet,int,1,0,pull,pull/parmPull.c:406
pullInterEnergySet,int,1,0,pull,pull/parmPull.c:431
pullLogAddSet,int,1,0,pull,pull/parmPull.c:492
-pullInitRandomSet,int,1,0,pull,pull/initPull.c:107
-pullInitHaltonSet,int,1,0,pull,pull/initPull.c:125
-pullInitPointPerVoxelSet,int,1,0,pull,pull/initPull.c:144
-pullInitGivenPosSet,int,1,0,pull,pull/initPull.c:172
-pullInitLiveThreshUseSet,int,1,0,pull,pull/initPull.c:186
-pullInitUnequalShapesAllowSet,int,1,0,pull,pull/initPull.c:199
-pullStart,int,1,0,pull,pull/corePull.c:111
-pullFinish,int,1,0,pull,pull/corePull.c:166
-pullRun,int,1,0,pull,pull/corePull.c:333
-pullEnergySpecParse,int,1,0,pull,pull/energy.c:625
-pullInfoSpecAdd,int,1,0,pull,pull/infoPull.c:130
-pullInfoGet,int,1,0,pull,pull/infoPull.c:402
-pullInfoSpecSprint,int,1,0,pull,pull/infoPull.c:447
pullPointNew,pullPoint *,NULL,0,pull,pull/pointPull.c:31
pullProbe,int,1,0,pull,pull/pointPull.c:356
pullPointInitializePerVoxel,int,1,0,pull,pull/pointPull.c:635
pullPointInitializeRandomOrHalton,int,1,0,pull,pull/pointPull.c:820
pullPointInitializeGivenPos,int,1,0,pull,pull/pointPull.c:991
-pullVolumeSingleAdd,int,1,0,pull,pull/volumePull.c:210
-pullVolumeStackAdd,int,1,0,pull,pull/volumePull.c:236
-pullVolumeLookup,const pullVolume *,NULL,0,pull,pull/volumePull.c:473
-pullConstraintScaleRange,int,1,0,pull,pull/volumePull.c:492
-pullCCFind,int,1,0,pull,pull/ccPull.c:28
-pullCCMeasure,int,1,0,pull,pull/ccPull.c:112
-pullCCSort,int,1,0,pull,pull/ccPull.c:207
pullTraceSet,int,1,0,pull,pull/trace.c:243
pullTraceMultiAdd,int,1,0,pull,pull/trace.c:672
pullTraceMultiPlotAdd,int,1,0,pull,pull/trace.c:702
pullTraceMultiWrite,int,1,0,pull,pull/trace.c:1012
pullTraceMultiRead,int,1,0,pull,pull/trace.c:1117
+pullVolumeSingleAdd,int,1,0,pull,pull/volumePull.c:210
+pullVolumeStackAdd,int,1,0,pull,pull/volumePull.c:236
+pullVolumeLookup,const pullVolume *,NULL,0,pull,pull/volumePull.c:473
+pullConstraintScaleRange,int,1,0,pull,pull/volumePull.c:492
Modified: teem/trunk/python/cffi/biffdata/push.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/push.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/push.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
pushOutputGet,int,1,0,push,push/action.c:69
pushBinProcess,int,1,0,push,push/action.c:159
pushBinPointAdd,int,1,0,push,push/binning.c:178
Modified: teem/trunk/python/cffi/biffdata/seek.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/seek.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/seek.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
seekExtract,int,1,0,seek,seek/extract.c:934
seekDataSet,int,1,0,seek,seek/setSeek.c:54
seekSamplesSet,int,1,0,seek,seek/setSeek.c:114
Modified: teem/trunk/python/cffi/biffdata/ten.csv
===================================================================
--- teem/trunk/python/cffi/biffdata/ten.csv 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/biffdata/ten.csv 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,4 @@
-func_name,return_type,error_val(s),mubi,biff_key,filename:linenumber
+func_name,return_type,error_val(s),mubi,biff_key,cfile:linenumber
tenAnisoPlot,int,1,0,ten,ten/aniso.c:1066
tenAnisoVolume,int,1,0,ten,ten/aniso.c:1125
tenAnisoHistogram,int,1,0,ten,ten/aniso.c:1197
@@ -29,6 +29,10 @@
tenEstimate1TensorSingle_f,int,1,0,ten,ten/estimate.c:1738
tenEstimate1TensorSingle_d,int,1,0,ten,ten/estimate.c:1766
tenEstimate1TensorVolume4D,int,1,0,ten,ten/estimate.c:1803
+tenExperSpecGradSingleBValSet,int,1,0,ten,ten/experSpec.c:61
+tenExperSpecGradBValSet,int,1,0,ten,ten/experSpec.c:102
+tenExperSpecFromKeyValueSet,int,1,0,ten,ten/experSpec.c:171
+tenDWMRIKeyValueFromExperSpecSet,int,1,0,ten,ten/experSpec.c:326
tenFiberTraceSet,int,1,0,ten,ten/fiber.c:826
tenFiberTrace,int,1,0,ten,ten/fiber.c:846
tenFiberDirectionNumber,unsigned int,0,0,ten,ten/fiber.c:866
@@ -76,8 +80,13 @@
tenInterpN_d,int,1,0,ten,ten/path.c:303
tenInterpTwoDiscrete_d,int,1,0,ten,ten/path.c:802
tenInterpMulti3D,int,1,0,ten,ten/path.c:952
-tenDwiGageKindSet,int,1,0,ten,ten/tenDwiGage.c:1035
-tenDwiGageKindCheck,int,1,0,ten,ten/tenDwiGage.c:1175
+tenDwiGageKindSet,int,1,0,ten,ten/tenDwiGage.c:1036
+tenDwiGageKindCheck,int,1,0,ten,ten/tenDwiGage.c:1176
+tenModelParse,int,1,0,ten,ten/tenModel.c:61
+tenModelFromAxisLearn,int,1,0,ten,ten/tenModel.c:122
+tenModelSimulate,int,1,0,ten,ten/tenModel.c:160
+tenModelSqeFit,int,1,0,ten,ten/tenModel.c:408
+tenModelConvert,int,1,0,ten,ten/tenModel.c:683
tenTensorCheck,int,1,4,ten,ten/tensor.c:52
tenMeasurementFrameReduce,int,1,0,ten,ten/tensor.c:85
tenExpand2D,int,1,0,ten,ten/tensor.c:155
@@ -87,12 +96,3 @@
tenSlice,int,1,0,ten,ten/tensor.c:629
tenTripleCalc,int,1,0,ten,ten/triple.c:413
tenTripleConvert,int,1,0,ten,ten/triple.c:471
-tenExperSpecGradSingleBValSet,int,1,0,ten,ten/experSpec.c:61
-tenExperSpecGradBValSet,int,1,0,ten,ten/experSpec.c:102
-tenExperSpecFromKeyValueSet,int,1,0,ten,ten/experSpec.c:171
-tenDWMRIKeyValueFromExperSpecSet,int,1,0,ten,ten/experSpec.c:326
-tenModelParse,int,1,0,ten,ten/tenModel.c:61
-tenModelFromAxisLearn,int,1,0,ten,ten/tenModel.c:122
-tenModelSimulate,int,1,0,ten,ten/tenModel.c:160
-tenModelSqeFit,int,1,0,ten,ten/tenModel.c:408
-tenModelConvert,int,1,0,ten,ten/tenModel.c:683
Modified: teem/trunk/python/cffi/cdef/cdef_air.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_air.h 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/cdef/cdef_air.h 2025-09-10 19:32:15 UTC (rev 7399)
@@ -656,14 +656,15 @@
** (as arising from !(NaN-NaN) or !(inf-inf)). BTW GLK is unsure why the current macro
** explicitly casts the result of "!" to int, since "!" already produces an int:
** https://en.cppreference.com/w/c/language/operator_logical. A more straight-forward
-** alternative, which avoids float conversion warnings, would be to use "x-x == x-x".
+** alternative, which avoids float conversion warnings, would be to use "x-x == x-x"
**
-** Configuring with CMake uses teem/CMake/testAIR_EXISTS.c to test this macro (but NOTE:
-** it has to be copy-pasted to there since it can't read air.h), which then produces
+** Configuring with CMake uses teem/CMake/TestAIR_EXISTS.c (and tries to compile it the
+** same as the rest of Teem will be compiled) to test this macro (but NOTE: it has to be
+** copy-pasted to there since it can't read air.h), which then produces
** teem-install-dir/include/teem/airExistsConf.h, which #define's AIR_EXISTS_MACRO_FAILS
-** or not, which controls whether AIR_EXISTS uses the clever macro or the more reliable
-** function call airExists. Still, there may be failure modes untested by
-** testAIR_EXISTS.c, and by the tests in air/airSanity().
+** or not, which controls whether AIR_EXISTS here uses the clever macro or the more
+** reliable function call airExists. There may yet be failure modes untested by
+** TestAIR_EXISTS.c, and by the tests in air/airSanity().
*/
/* ---- BEGIN non-NrrdIO */
/* clang-format off */
Modified: teem/trunk/python/cffi/cdef/cdef_nrrd.h
===================================================================
--- teem/trunk/python/cffi/cdef/cdef_nrrd.h 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/cdef/cdef_nrrd.h 2025-09-10 19:32:15 UTC (rev 7399)
@@ -455,7 +455,7 @@
the parameter vector */
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);
/* integral of kernel from -support to +support */
Modified: teem/trunk/python/cffi/teem.py
===================================================================
--- teem/trunk/python/cffi/teem.py 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/python/cffi/teem.py 2025-09-10 19:32:15 UTC (rev 7399)
@@ -231,6 +231,9 @@
'nrrdDeringRadialKernelSet': (_equals_one, 0, b'nrrd', 'nrrd/deringNrrd.c:268'),
'nrrdDeringThetaKernelSet': (_equals_one, 0, b'nrrd', 'nrrd/deringNrrd.c:288'),
'nrrdDeringExecute': (_equals_one, 0, b'nrrd', 'nrrd/deringNrrd.c:748'),
+ 'nrrdFFTWWisdomRead': (_equals_one, 0, b'nrrd', 'nrrd/fftNrrd.c:32'),
+ 'nrrdFFT': (_equals_one, 0, b'nrrd', 'nrrd/fftNrrd.c:88'),
+ 'nrrdFFTWWisdomWrite': (_equals_one, 0, b'nrrd', 'nrrd/fftNrrd.c:285'),
'nrrdCheapMedian': (_equals_one, 0, b'nrrd', 'nrrd/filt.c:405'),
'nrrdDistanceL2': (_equals_one, 0, b'nrrd', 'nrrd/filt.c:812'),
'nrrdDistanceL2Biased': (_equals_one, 0, b'nrrd', 'nrrd/filt.c:824'),
@@ -309,9 +312,6 @@
'nrrdResampleRoundSet': (_equals_one, 0, b'nrrd', 'nrrd/resampleContext.c:499'),
'nrrdResampleClampSet': (_equals_one, 0, b'nrrd', 'nrrd/resampleContext.c:516'),
'nrrdResampleExecute': (_equals_one, 0, b'nrrd', 'nrrd/resampleContext.c:1451'),
- 'nrrdFFTWWisdomRead': (_equals_one, 0, b'nrrd', 'nrrd/fftNrrd.c:32'),
- 'nrrdFFT': (_equals_one, 0, b'nrrd', 'nrrd/fftNrrd.c:88'),
- 'nrrdFFTWWisdomWrite': (_equals_one, 0, b'nrrd', 'nrrd/fftNrrd.c:285'),
'nrrdSimpleResample': (_equals_one, 0, b'nrrd', 'nrrd/resampleNrrd.c:49'),
'nrrdSpatialResample': (_equals_one, 0, b'nrrd', 'nrrd/resampleNrrd.c:519'),
'nrrdSpaceSet': (_equals_one, 0, b'nrrd', 'nrrd/simple.c:81'),
@@ -374,6 +374,11 @@
'gageDeconvolveSeparable': (_equals_one, 0, b'gage', 'gage/deconvolve.c:206'),
'gageKindCheck': (_equals_one, 0, b'gage', 'gage/kind.c:31'),
'gageKindVolumeCheck': (_equals_one, 0, b'gage', 'gage/kind.c:216'),
+ 'gageOptimSigSet': (_equals_one, 0, b'gage', 'gage/optimsig.c:215'),
+ 'gageOptimSigContextNew': (_equals_null, 0, b'gage', 'gage/optimsig.c:309'),
+ 'gageOptimSigCalculate': (_equals_one, 0, b'gage', 'gage/optimsig.c:1088'),
+ 'gageOptimSigErrorPlot': (_equals_one, 0, b'gage', 'gage/optimsig.c:1160'),
+ 'gageOptimSigErrorPlotSliding': (_equals_one, 0, b'gage', 'gage/optimsig.c:1251'),
'gageVolumeCheck': (_equals_one, 0, b'gage', 'gage/pvl.c:34'),
'gagePerVolumeNew': (_equals_null, 0, b'gage', 'gage/pvl.c:55'),
'gageQueryReset': (_equals_one, 0, b'gage', 'gage/pvl.c:259'),
@@ -405,11 +410,6 @@
'gageStackBlurGet': (_equals_one, 0, b'gage', 'gage/stackBlur.c:1595'),
'gageStackBlurManage': (_equals_one, 0, b'gage', 'gage/stackBlur.c:1696'),
'gageUpdate': (_equals_one, 0, b'gage', 'gage/update.c:311'),
- 'gageOptimSigSet': (_equals_one, 0, b'gage', 'gage/optimsig.c:215'),
- 'gageOptimSigContextNew': (_equals_null, 0, b'gage', 'gage/optimsig.c:309'),
- 'gageOptimSigCalculate': (_equals_one, 0, b'gage', 'gage/optimsig.c:1088'),
- 'gageOptimSigErrorPlot': (_equals_one, 0, b'gage', 'gage/optimsig.c:1160'),
- 'gageOptimSigErrorPlotSliding': (_equals_one, 0, b'gage', 'gage/optimsig.c:1251'),
'dyeConvert': (_equals_one, 0, b'dye', 'dye/convertDye.c:349'),
'dyeColorParse': (_equals_one, 0, b'dye', 'dye/methodsDye.c:183'),
'baneClipNew': (_equals_null, 0, b'bane', 'bane/clip.c:100'),
@@ -491,13 +491,6 @@
'limnObjectPSDrawConcave': (_equals_one, 0, b'limn', 'limn/renderLimn.c:312'),
'limnSplineNrrdEvaluate': (_equals_one, 0, b'limn', 'limn/splineEval.c:321'),
'limnSplineSample': (_equals_one, 0, b'limn', 'limn/splineEval.c:359'),
- 'limnSplineTypeSpecNew': (_equals_null, 0, b'limn', 'limn/splineMethods.c:23'),
- 'limnSplineNew': (_equals_null, 0, b'limn', 'limn/splineMethods.c:122'),
- 'limnSplineNrrdCleverFix': (_equals_one, 0, b'limn', 'limn/splineMethods.c:247'),
- 'limnSplineCleverNew': (_equals_null, 0, b'limn', 'limn/splineMethods.c:392'),
- 'limnSplineUpdate': (_equals_one, 0, b'limn', 'limn/splineMethods.c:420'),
- 'limnSplineTypeSpecParse': (_equals_null, 0, b'limn', 'limn/splineMisc.c:220'),
- 'limnSplineParse': (_equals_null, 0, b'limn', 'limn/splineMisc.c:276'),
'limnCbfPointsNew': (_equals_null, 0, b'limn', 'limn/splineFit.c:175'),
'limnCbfPointsCheck': (_equals_one, 0, b'limn', 'limn/splineFit.c:247'),
'limnCbfCtxPrep': (_equals_one, 0, b'limn', 'limn/splineFit.c:518'),
@@ -506,6 +499,13 @@
'limnCbfCorners': (_equals_one, 0, b'limn', 'limn/splineFit.c:1577'),
'limnCbfMulti': (_equals_one, 0, b'limn', 'limn/splineFit.c:1779'),
'limnCbfGo': (_equals_one, 0, b'limn', 'limn/splineFit.c:1897'),
+ 'limnSplineTypeSpecNew': (_equals_null, 0, b'limn', 'limn/splineMethods.c:23'),
+ 'limnSplineNew': (_equals_null, 0, b'limn', 'limn/splineMethods.c:122'),
+ 'limnSplineNrrdCleverFix': (_equals_one, 0, b'limn', 'limn/splineMethods.c:247'),
+ 'limnSplineCleverNew': (_equals_null, 0, b'limn', 'limn/splineMethods.c:392'),
+ 'limnSplineUpdate': (_equals_one, 0, b'limn', 'limn/splineMethods.c:420'),
+ 'limnSplineTypeSpecParse': (_equals_null, 0, b'limn', 'limn/splineMisc.c:220'),
+ 'limnSplineParse': (_equals_null, 0, b'limn', 'limn/splineMisc.c:276'),
'limnObjectWorldHomog': (_equals_one, 0, b'limn', 'limn/transform.c:23'),
'limnObjectFaceNormals': (_equals_one, 0, b'limn', 'limn/transform.c:45'),
'limnObjectSpaceTransform': (_equals_one, 0, b'limn', 'limn/transform.c:208'),
@@ -563,6 +563,10 @@
'tenEstimate1TensorSingle_f': (_equals_one, 0, b'ten', 'ten/estimate.c:1738'),
'tenEstimate1TensorSingle_d': (_equals_one, 0, b'ten', 'ten/estimate.c:1766'),
'tenEstimate1TensorVolume4D': (_equals_one, 0, b'ten', 'ten/estimate.c:1803'),
+ 'tenExperSpecGradSingleBValSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:61'),
+ 'tenExperSpecGradBValSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:102'),
+ 'tenExperSpecFromKeyValueSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:171'),
+ 'tenDWMRIKeyValueFromExperSpecSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:326'),
'tenFiberTraceSet': (_equals_one, 0, b'ten', 'ten/fiber.c:826'),
'tenFiberTrace': (_equals_one, 0, b'ten', 'ten/fiber.c:846'),
'tenFiberDirectionNumber': ((lambda rv: 0 == rv), 0, b'ten', 'ten/fiber.c:866'),
@@ -610,8 +614,13 @@
'tenInterpN_d': (_equals_one, 0, b'ten', 'ten/path.c:303'),
'tenInterpTwoDiscrete_d': (_equals_one, 0, b'ten', 'ten/path.c:802'),
'tenInterpMulti3D': (_equals_one, 0, b'ten', 'ten/path.c:952'),
- 'tenDwiGageKindSet': (_equals_one, 0, b'ten', 'ten/tenDwiGage.c:1035'),
- 'tenDwiGageKindCheck': (_equals_one, 0, b'ten', 'ten/tenDwiGage.c:1175'),
+ 'tenDwiGageKindSet': (_equals_one, 0, b'ten', 'ten/tenDwiGage.c:1036'),
+ 'tenDwiGageKindCheck': (_equals_one, 0, b'ten', 'ten/tenDwiGage.c:1176'),
+ 'tenModelParse': (_equals_one, 0, b'ten', 'ten/tenModel.c:61'),
+ 'tenModelFromAxisLearn': (_equals_one, 0, b'ten', 'ten/tenModel.c:122'),
+ 'tenModelSimulate': (_equals_one, 0, b'ten', 'ten/tenModel.c:160'),
+ 'tenModelSqeFit': (_equals_one, 0, b'ten', 'ten/tenModel.c:408'),
+ 'tenModelConvert': (_equals_one, 0, b'ten', 'ten/tenModel.c:683'),
'tenTensorCheck': (_equals_one, 4, b'ten', 'ten/tensor.c:52'),
'tenMeasurementFrameReduce': (_equals_one, 0, b'ten', 'ten/tensor.c:85'),
'tenExpand2D': (_equals_one, 0, b'ten', 'ten/tensor.c:155'),
@@ -621,25 +630,32 @@
'tenSlice': (_equals_one, 0, b'ten', 'ten/tensor.c:629'),
'tenTripleCalc': (_equals_one, 0, b'ten', 'ten/triple.c:413'),
'tenTripleConvert': (_equals_one, 0, b'ten', 'ten/triple.c:471'),
- 'tenExperSpecGradSingleBValSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:61'),
- 'tenExperSpecGradBValSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:102'),
- 'tenExperSpecFromKeyValueSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:171'),
- 'tenDWMRIKeyValueFromExperSpecSet': (_equals_one, 0, b'ten', 'ten/experSpec.c:326'),
- 'tenModelParse': (_equals_one, 0, b'ten', 'ten/tenModel.c:61'),
- 'tenModelFromAxisLearn': (_equals_one, 0, b'ten', 'ten/tenModel.c:122'),
- 'tenModelSimulate': (_equals_one, 0, b'ten', 'ten/tenModel.c:160'),
- 'tenModelSqeFit': (_equals_one, 0, b'ten', 'ten/tenModel.c:408'),
- 'tenModelConvert': (_equals_one, 0, b'ten', 'ten/tenModel.c:683'),
'pullEnergyPlot': (_equals_one, 0, b'pull', 'pull/actionPull.c:230'),
'pullBinProcess': (_equals_one, 0, b'pull', 'pull/actionPull.c:1104'),
'pullGammaLearn': (_equals_one, 0, b'pull', 'pull/actionPull.c:1139'),
'pullBinsPointAdd': (_equals_one, 0, b'pull', 'pull/binningPull.c:181'),
'pullBinsPointMaybeAdd': (_equals_one, 0, b'pull', 'pull/binningPull.c:203'),
+ 'pullCCFind': (_equals_one, 0, b'pull', 'pull/ccPull.c:28'),
+ 'pullCCMeasure': (_equals_one, 0, b'pull', 'pull/ccPull.c:112'),
+ 'pullCCSort': (_equals_one, 0, b'pull', 'pull/ccPull.c:207'),
'pullOutputGetFilter': (_equals_one, 0, b'pull', 'pull/contextPull.c:379'),
'pullOutputGet': (_equals_one, 0, b'pull', 'pull/contextPull.c:575'),
'pullPropGet': (_equals_one, 0, b'pull', 'pull/contextPull.c:588'),
'pullPositionHistoryNrrdGet': (_equals_one, 0, b'pull', 'pull/contextPull.c:766'),
'pullPositionHistoryPolydataGet': (_equals_one, 0, b'pull', 'pull/contextPull.c:838'),
+ 'pullStart': (_equals_one, 0, b'pull', 'pull/corePull.c:111'),
+ 'pullFinish': (_equals_one, 0, b'pull', 'pull/corePull.c:166'),
+ 'pullRun': (_equals_one, 0, b'pull', 'pull/corePull.c:333'),
+ 'pullEnergySpecParse': (_equals_one, 0, b'pull', 'pull/energy.c:625'),
+ 'pullInfoSpecAdd': (_equals_one, 0, b'pull', 'pull/infoPull.c:130'),
+ 'pullInfoGet': (_equals_one, 0, b'pull', 'pull/infoPull.c:402'),
+ 'pullInfoSpecSprint': (_equals_one, 0, b'pull', 'pull/infoPull.c:447'),
+ 'pullInitRandomSet': (_equals_one, 0, b'pull', 'pull/initPull.c:107'),
+ 'pullInitHaltonSet': (_equals_one, 0, b'pull', 'pull/initPull.c:125'),
+ 'pullInitPointPerVoxelSet': (_equals_one, 0, b'pull', 'pull/initPull.c:144'),
+ 'pullInitGivenPosSet': (_equals_one, 0, b'pull', 'pull/initPull.c:172'),
+ 'pullInitLiveThreshUseSet': (_equals_one, 0, b'pull', 'pull/initPull.c:186'),
+ 'pullInitUnequalShapesAllowSet': (_equals_one, 0, b'pull', 'pull/initPull.c:199'),
'pullIterParmSet': (_equals_one, 0, b'pull', 'pull/parmPull.c:102'),
'pullSysParmSet': (_equals_one, 0, b'pull', 'pull/parmPull.c:191'),
'pullFlagSet': (_equals_one, 0, b'pull', 'pull/parmPull.c:270'),
@@ -650,36 +666,20 @@
'pullCallbackSet': (_equals_one, 0, b'pull', 'pull/parmPull.c:406'),
'pullInterEnergySet': (_equals_one, 0, b'pull', 'pull/parmPull.c:431'),
'pullLogAddSet': (_equals_one, 0, b'pull', 'pull/parmPull.c:492'),
- 'pullInitRandomSet': (_equals_one, 0, b'pull', 'pull/initPull.c:107'),
- 'pullInitHaltonSet': (_equals_one, 0, b'pull', 'pull/initPull.c:125'),
- 'pullInitPointPerVoxelSet': (_equals_one, 0, b'pull', 'pull/initPull.c:144'),
- 'pullInitGivenPosSet': (_equals_one, 0, b'pull', 'pull/initPull.c:172'),
- 'pullInitLiveThreshUseSet': (_equals_one, 0, b'pull', 'pull/initPull.c:186'),
- 'pullInitUnequalShapesAllowSet': (_equals_one, 0, b'pull', 'pull/initPull.c:199'),
- 'pullStart': (_equals_one, 0, b'pull', 'pull/corePull.c:111'),
- 'pullFinish': (_equals_one, 0, b'pull', 'pull/corePull.c:166'),
- 'pullRun': (_equals_one, 0, b'pull', 'pull/corePull.c:333'),
- 'pullEnergySpecParse': (_equals_one, 0, b'pull', 'pull/energy.c:625'),
- 'pullInfoSpecAdd': (_equals_one, 0, b'pull', 'pull/infoPull.c:130'),
- 'pullInfoGet': (_equals_one, 0, b'pull', 'pull/infoPull.c:402'),
- 'pullInfoSpecSprint': (_equals_one, 0, b'pull', 'pull/infoPull.c:447'),
'pullPointNew': (_equals_null, 0, b'pull', 'pull/pointPull.c:31'),
'pullProbe': (_equals_one, 0, b'pull', 'pull/pointPull.c:356'),
'pullPointInitializePerVoxel': (_equals_one, 0, b'pull', 'pull/pointPull.c:635'),
'pullPointInitializeRandomOrHalton': (_equals_one, 0, b'pull', 'pull/pointPull.c:820'),
'pullPointInitializeGivenPos': (_equals_one, 0, b'pull', 'pull/pointPull.c:991'),
- 'pullVolumeSingleAdd': (_equals_one, 0, b'pull', 'pull/volumePull.c:210'),
- 'pullVolumeStackAdd': (_equals_one, 0, b'pull', 'pull/volumePull.c:236'),
- 'pullVolumeLookup': (_equals_null, 0, b'pull', 'pull/volumePull.c:473'),
- 'pullConstraintScaleRange': (_equals_one, 0, b'pull', 'pull/volumePull.c:492'),
- 'pullCCFind': (_equals_one, 0, b'pull', 'pull/ccPull.c:28'),
- 'pullCCMeasure': (_equals_one, 0, b'pull', 'pull/ccPull.c:112'),
- 'pullCCSort': (_equals_one, 0, b'pull', 'pull/ccPull.c:207'),
'pullTraceSet': (_equals_one, 0, b'pull', 'pull/trace.c:243'),
'pullTraceMultiAdd': (_equals_one, 0, b'pull', 'pull/trace.c:672'),
'pullTraceMultiPlotAdd': (_equals_one, 0, b'pull', 'pull/trace.c:702'),
'pullTraceMultiWrite': (_equals_one, 0, b'pull', 'pull/trace.c:1012'),
'pullTraceMultiRead': (_equals_one, 0, b'pull', 'pull/trace.c:1117'),
+ 'pullVolumeSingleAdd': (_equals_one, 0, b'pull', 'pull/volumePull.c:210'),
+ 'pullVolumeStackAdd': (_equals_one, 0, b'pull', 'pull/volumePull.c:236'),
+ 'pullVolumeLookup': (_equals_null, 0, b'pull', 'pull/volumePull.c:473'),
+ 'pullConstraintScaleRange': (_equals_one, 0, b'pull', 'pull/volumePull.c:492'),
'coilStart': (_equals_one, 0, b'coil', 'coil/coreCoil.c:285'),
'coilIterate': (_equals_one, 0, b'coil', 'coil/coreCoil.c:360'),
'coilFinish': (_equals_one, 0, b'coil', 'coil/coreCoil.c:405'),
Modified: teem/trunk/src/_util/gen_biffdata.py
===================================================================
--- teem/trunk/src/_util/gen_biffdata.py 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/src/_util/gen_biffdata.py 2025-09-10 19:32:15 UTC (rev 7399)
@@ -204,23 +204,31 @@
def proc_lib(path_teem: str, lib: str) -> list[str]:
"""
From Teem source checkout at path_teem, for Teem library lib, generate lines of csv data
- about Biff annotations
+ about Biff annotations. This involves reading in the teem/src/<lib>/CMakeLists.txt file
+ to learn what are the .c files that make up the library <lib>.
"""
path_srcs = f'{path_teem}/src/{lib}'
# read the CMakeLists.txt file to get list of source files
+ # NOTE: This requires the "-v2" re-write of the CMakeLists.txt files for Teem v2
+ # (sorry time does not permit writing code to handle both v1 and v2 formats)
with open(f'{path_srcs}/CMakeLists.txt', 'r', encoding='utf8') as cmfile:
- ilines = [line.strip() for line in cmfile.readlines()]
- idx0 = ilines.index(f'set({lib.upper()}_SOURCES')
- idx1 = ilines.index(')')
- filenames = filter(lambda fn: fn.endswith('.c'), ilines[idx0 + 1 : idx1])
+ # read in lines, handling comments now
+ ilines = [line.strip().split('#', 1)[0].strip() for line in cmfile.readlines()]
+ idx0 = ilines.index('SOURCES')
+ # .c filenames, .h private header filenames go between these lines
+ idx1 = ilines.index('PUBLIC_HEADERS')
+ cfiles = []
+ for line in ilines[idx0 + 1 : idx1]:
+ # only keep the .c filenames, not the .h private header filenames
+ cfiles += filter(lambda fn: fn.endswith('.c'), line.split(' '))
olines = []
- for filename in filenames:
+ for cfile in cfiles:
if VERB > 1:
- print(f'... {lib}/{filename}')
- with open(f'{path_srcs}/{filename}', 'r', encoding='utf8') as file:
- olines += proc_src(file, f'{lib}/{filename}')
+ print(f'... {lib}/{cfile}')
+ with open(f'{path_srcs}/{cfile}', 'r', encoding='utf8') as file:
+ olines += proc_src(file, f'{lib}/{cfile}')
if olines:
- olines.insert(0, proc_annote('HEADER', '', '') + ',filename:linenumber')
+ olines.insert(0, proc_annote('HEADER', '', '') + ',cfile:linenumber')
return olines
Modified: teem/trunk/src/air/CMakeLists-v2.txt
===================================================================
--- teem/trunk/src/air/CMakeLists-v2.txt 2025-09-10 17:14:53 UTC (rev 7398)
+++ teem/trunk/src/air/CMakeLists-v2.txt 2025-09-10 19:32:15 UTC (rev 7399)
@@ -1,4 +1,6 @@
_Teem_add_library(${CMAKE_CURRENT_SOURCE_DIR}
+ # NOTE: teem/src/_util/gen_biffdata.py expects both "SOURCES" and "PUBLIC_HEADERS"
+ # to be on lines by themselves (modulo whitespace) as THE way to list all .c files
SOURCES
# list here pasted in from:
# svn status *.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 17:14:55
|
Revision: 7398
http://sourceforge.net/p/teem/code/7398
Author: kindlmann
Date: 2025-09-10 17:14:53 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
now the dependency-related pseudo-dictionaries all start with _Teem_dep_, and, finally adding support for pkg-config, and also making old-school teem-config script
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-10 17:08:41 UTC (rev 7397)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-10 17:14:53 UTC (rev 7398)
@@ -17,7 +17,7 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# Teem/CMakeLists.txt Version 10.96
+# Teem/CMakeLists.txt Version 10.97
# This CMakeLists.txt describes a Teem package that contains:
# (1) a library ("libteem" on unix) and
@@ -90,32 +90,32 @@
option(BUILD_SHARED_LIBS "Build a libteem shared library" ON)
# The canonical list of libraries that Teem can (optionally) depend on. Within this
-# CMakeLists.txt file, each one is a "DEP" or dependency However, FYI, within the
-# GNUmakefiles, each is called an EXT or external. Note: inter-dependency dependencies
+# CMakeLists.txt file, each one is a "DEP" or dependency (however, FYI, within the
+# GNUmakefiles, each is called an EXT or external). Note: inter-dependency dependencies
# are known in the INTERFACE_LINK_LIBRARIES of each target.
set(_Teem_DEPS PNG ZLIB BZIP2 LEVMAR FFTW3 PTHREAD)
# docstrings of all dependencies, to avoid redundancy between
-# option(Teem_DEP "${_doc}" ON) and set(Teem_DEP OFF CACHE BOOL "${_doc}" FORCE)
-set(_doc_ZLIB "Enable nrrd support for zlib (\"gzip\") data encoding")
-set(_doc_PNG "Enable nrrd support for PNG format images")
-set(_doc_BZIP2 "Enable nrrd support for bzip2 data encoding")
-set(_doc_PTHREAD "Enable hoover support for multi-threaded rendering")
-set(_doc_LEVMAR "Build with levmar for better elf and ten")
-set(_doc_FFTW3 "Build with fftw3 to enable nrrdFFT() and `unu fft`")
+# option(Teem_DEP "<doc>" ON) and set(Teem_DEP OFF CACHE BOOL "<doc>" FORCE)
+set(_Teem_dep_doc_ZLIB "Enable nrrd support for zlib (\"gzip\") data encoding")
+set(_Teem_dep_doc_PNG "Enable nrrd support for PNG format images")
+set(_Teem_dep_doc_BZIP2 "Enable nrrd support for bzip2 data encoding")
+set(_Teem_dep_doc_PTHREAD "Enable hoover support for multi-threaded rendering")
+set(_Teem_dep_doc_LEVMAR "Build with levmar for better elf and ten")
+set(_Teem_dep_doc_FFTW3 "Build with fftw3 to enable nrrdFFT() and `unu fft`")
# Whether to default to DEP being ON or OFF
-set(_dflt_ZLIB ON)
-set(_dflt_PNG ON)
-set(_dflt_BZIP2 OFF)
-set(_dflt_PTHREAD ON)
-set(_dflt_LEVMAR OFF)
-set(_dflt_FFTW3 OFF)
+set(_Teem_dep_dflt_ZLIB ON)
+set(_Teem_dep_dflt_PNG ON)
+set(_Teem_dep_dflt_BZIP2 OFF)
+set(_Teem_dep_dflt_PTHREAD ON)
+set(_Teem_dep_dflt_LEVMAR OFF)
+set(_Teem_dep_dflt_FFTW3 OFF)
# Add an option() for Teem_USE_DEP for each dependency DEP
foreach(_tdep IN LISTS _Teem_DEPS)
- # option name docstring default value
- option(Teem_USE_${_tdep} "${_doc_${_tdep}}" ${_dflt_${_tdep}})
+ # option name docstring default value
+ option(Teem_USE_${_tdep} "${_Teem_dep_doc_${_tdep}}" ${_Teem_dep_dflt_${_tdep}})
endforeach()
# Other options
@@ -157,7 +157,7 @@
###-------------------------------------------------------------------------------------
# Dependency discovery
-# - normalize names/targets/FOUND vars
+# - normalize _Teem_dep_*_DEP pseudo-dictionary variables
# - run find_package() for requested DEPs
# can't do PNG without ZLIB
@@ -167,31 +167,39 @@
endif()
# Special cases of CMake package names (not "DEP")
-set(_cpname_BZIP2 "BZip2")
-set(_cpname_PTHREAD "Threads")
+set(_Teem_dep_cpname_BZIP2 "BZip2")
+set(_Teem_dep_cpname_PTHREAD "Threads")
# Special cases of namespace::targetname (not "DEP::DEP")
-set(_target_BZIP2 "BZip2::BZip2")
-set(_target_PTHREAD "Threads::Threads")
-set(_target_FFTW3 "FFTW3::fftw3")
+set(_Teem_dep_target_BZIP2 "BZip2::BZip2")
+set(_Teem_dep_target_PTHREAD "Threads::Threads")
+set(_Teem_dep_target_FFTW3 "FFTW3::fftw3")
# Special cases of variable name to test for DEP availability (not "DEP_FOUND")
# (yes PTHREAD is special; there isn't a "Threads_FOUND"; but this enables uniformity)
-set(_found_PTHREAD "CMAKE_USE_PTHREADS_INIT")
+set(_Teem_dep_found_PTHREAD "CMAKE_USE_PTHREADS_INIT")
+# Special cases of how to name library with -l flag to linker command (not "-ldep")
+set(_Teem_dep_llink_ZLIB "-lz")
+set(_Teem_dep_llink_BZIP2 "-lbz2")
+set(_Teem_dep_llink_PTHREAD "-pthread")
-# Make sure _{cpack,target,found}_DEP are defined for all DEPS
+# Make sure _Teem_dep_{cpack,target,found,llink}_DEP are defined for all DEPS
+# CMake (still) doesn't have anything like a dictionary, so we don't have
+# (for example): _Teem_dep_cpname[_tdep]
+# but after the following, we do have: ${_Teem_dep_cpname_${_tdep}}
foreach(_tdep IN LISTS _Teem_DEPS)
- if(NOT DEFINED _cpname_${_tdep})
- set(_cpname_${_tdep} "${_tdep}")
+ if(NOT DEFINED _Teem_dep_cpname_${_tdep})
+ set(_Teem_dep_cpname_${_tdep} "${_tdep}")
endif()
- if(NOT DEFINED _target_${_tdep})
- set(_target_${_tdep} "${_tdep}::${_tdep}")
+ if(NOT DEFINED _Teem_dep_target_${_tdep})
+ set(_Teem_dep_target_${_tdep} "${_tdep}::${_tdep}")
endif()
- if(NOT DEFINED _found_${_tdep})
- set(_found_${_tdep} "${_tdep}_FOUND")
+ if(NOT DEFINED _Teem_dep_found_${_tdep})
+ set(_Teem_dep_found_${_tdep} "${_tdep}_FOUND")
endif()
+ if(NOT DEFINED _Teem_dep_llink_${_tdep})
+ string(TOLOWER ${_tdep} _dep_lc)
+ set(_Teem_dep_llink_${_tdep} "-l${_dep_lc}")
+ endif()
endforeach()
-# CMake (still) doesn't have anything like a dictionary,
-# so we don't have (for example): _cpname[_tdep]
-# 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 (i.e. we "have" it)
@@ -198,11 +206,11 @@
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_USE_${_tdep})
# this DEP is requested
- find_package(${_cpname_${_tdep}} QUIET)
- if(${_found_${_tdep}})
+ find_package(${_Teem_dep_cpname_${_tdep}} QUIET)
+ if(${_Teem_dep_found_${_tdep}})
set(Teem_HAVE_${_tdep} TRUE)
else()
- set(Teem_USE_${_tdep} OFF CACHE BOOL "${_doc_${_tdep}}" FORCE)
+ set(Teem_USE_${_tdep} OFF CACHE BOOL "${_Teem_dep_doc_${_tdep}}" FORCE)
endif()
endif()
endforeach()
@@ -261,7 +269,7 @@
# - how to link with _tdep's library at link time
foreach(_tdep IN LISTS _Teem_DEPS)
if(Teem_HAVE_${_tdep})
- message(STATUS "Will use ${_tdep}: ${_doc_${_tdep}}")
+ message(STATUS "Will use ${_tdep}: ${_Teem_dep_doc_${_tdep}}")
# 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
@@ -269,9 +277,9 @@
# 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}}")
+ target_link_libraries(Teem PRIVATE "${_Teem_dep_target_${_tdep}}")
else()
- message(STATUS " (not using ${_tdep}: ${_doc_${_tdep}})")
+ message(STATUS " (not using ${_tdep}: ${_Teem_dep_doc_${_tdep}})")
endif()
endforeach()
@@ -468,7 +476,7 @@
endif()
###-------------------------------------------------------------------------------------
-# Install rules
+# Install rules to create the CMake package
# Declare how Teem should be installed, and hang all this off the "TeemTargets" export
# set. This does not copy files immediately; it only registers installation rules, which
@@ -494,7 +502,7 @@
string(APPEND _Teem_find_deps "include(CMakeFindDependencyMacro)\n")
endif()
# Map to CMake package name
- string(APPEND _Teem_find_deps "find_dependency(${_cpname_${_tdep}} REQUIRED)\n")
+ string(APPEND _Teem_find_deps "find_dependency(${_Teem_dep_cpname_${_tdep}} REQUIRED)\n")
endif()
endforeach()
if(NOT _Teem_find_deps)
@@ -539,3 +547,36 @@
${CMAKE_CURRENT_BINARY_DIR}/TeemConfigVersion.cmake
DESTINATION ${CONFIG_INSTALL_DIR}
)
+
+###-------------------------------------------------------------------------------------
+# For non-CMake consumers: create teem.pc for pkg-config, and teem-config script
+
+# Collect all private -llib dependency flags
+set(_pc_private_libs "")
+foreach(_tdep IN LISTS _Teem_DEPS)
+ if(Teem_HAVE_${_tdep})
+ string(APPEND _pc_private_libs " ${_Teem_dep_llink_${_tdep}}")
+ endif()
+endforeach()
+if(LIBM_NEEDED)
+ string(APPEND _pc_private_libs " -lm")
+endif()
+set(Teem_PC_PRIVATE_LIBS "${_pc_private_libs}")
+
+# Generate pkg-config teem.pc file
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMake/teem.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/teem.pc @ONLY
+)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/teem.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
+
+# Generate teem-config helper script
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMake/teem-config.in
+ ${CMAKE_CURRENT_BINARY_DIR}/teem-config @ONLY
+)
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/teem-config
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 17:08:42
|
Revision: 7397
http://sourceforge.net/p/teem/code/7397
Author: kindlmann
Date: 2025-09-10 17:08:41 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
finally adding support for pkg-config, and also making old-school teem-config script
Added Paths:
-----------
teem/trunk/CMake/teem-config.in
teem/trunk/CMake/teem.pc.in
Added: teem/trunk/CMake/teem-config.in
===================================================================
--- teem/trunk/CMake/teem-config.in (rev 0)
+++ teem/trunk/CMake/teem-config.in 2025-09-10 17:08:41 UTC (rev 7397)
@@ -0,0 +1,40 @@
+#!/bin/sh
+# teem-config: script to document how this Teem was built
+# Copyright (C) 2025 University of Chicago
+
+USAGE="Usage: $0 [--cflags] [--libs] [--version]"
+
+if [ $# -eq 0 ]; then
+ echo $USAGE
+ exit 1
+fi
+
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+version=@Teem_VERSION_STRING@
+private_libs="@Teem_PC_PRIVATE_LIBS@"
+
+show_cflags=no
+show_libs=no
+show_version=no
+
+for arg in "$@"; do
+ case "$arg" in
+ --cflags) show_cflags=yes ;;
+ --libs) show_libs=yes ;;
+ --version) show_version=yes ;;
+ *) echo $USAGE; exit 1 ;;
+ esac
+done
+
+if [ "$show_cflags" = yes ]; then
+ echo -I${includedir}
+fi
+if [ "$show_libs" = yes ]; then
+ echo -L${libdir} -lteem ${private_libs}
+fi
+if [ "$show_version" = yes ]; then
+ echo ${version}
+fi
Added: teem/trunk/CMake/teem.pc.in
===================================================================
--- teem/trunk/CMake/teem.pc.in (rev 0)
+++ teem/trunk/CMake/teem.pc.in 2025-09-10 17:08:41 UTC (rev 7397)
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+Name: Teem
+Description: Tools to process and visualize scientific data and images
+Version: @Teem_VERSION_STRING@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lteem
+Libs.private: @Teem_PC_PRIVATE_LIBS@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 04:35:44
|
Revision: 7396
http://sourceforge.net/p/teem/code/7396
Author: kindlmann
Date: 2025-09-10 04:35:41 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
more uniform formatting
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-10 04:30:02 UTC (rev 7395)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-10 04:35:41 UTC (rev 7396)
@@ -4,22 +4,20 @@
# 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/>.
#
-# Teem/CMakeLists.txt Version 10.95
+# Teem/CMakeLists.txt Version 10.96
# This CMakeLists.txt describes a Teem package that contains:
# (1) a library ("libteem" on unix) and
@@ -456,7 +454,7 @@
# If requested, helper dehex/exhex programs
if(Teem_BUILD_HEX_UTILS)
- add_subdirectory(src/hex)
+ add_subdirectory(src/hex)
endif()
###-------------------------------------------------------------------------------------
@@ -466,7 +464,7 @@
# offer a much more convenient way to call into Teem.
if(BUILD_TESTING)
- add_subdirectory(tests/ctest)
+ add_subdirectory(tests/ctest)
endif()
###-------------------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 04:30:06
|
Revision: 7395
http://sourceforge.net/p/teem/code/7395
Author: kindlmann
Date: 2025-09-10 04:30:02 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
comment tweaks
Modified Paths:
--------------
teem/trunk/CMake/CheckAirExists.cmake
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckAirExists.cmake
===================================================================
--- teem/trunk/CMake/CheckAirExists.cmake 2025-09-10 02:12:17 UTC (rev 7394)
+++ teem/trunk/CMake/CheckAirExists.cmake 2025-09-10 04:30:02 UTC (rev 7395)
@@ -1,26 +1,25 @@
# CMake/CheckAirExists.cmake: see if AIR_EXISTS() macro works like isfinite()
-# sets AIR_EXISTS_MACRO_FAILS if not
# Copyright (C) 2025 University of Chicago
# See ../LICENSE.txt for licensing terms
-# A lot of work for one little macro (which GLK started using before the functionally
-# equivalent isfinite() became widely available). The little CMake/TestAIR_EXISTS.c
-# program tests the equivalent of AIR_EXISTS (but without directly using air.h's
-# AIR_EXISTS because this has to be stand-alone), to see if it can correctly detect
-# IEEE754 special values (NaNs and infinities). For this to be a useful test that informs
-# how the rest of Teem code will work, TestAIR_EXISTS.c needs to be compiled the same as
-# Teem itself will be compiled later. Sadly, it was not until Teem V2 that this
-# consistency was actually enforced (!) To further help debugging, we also print out
-# exactly how TestAIR_EXISTS.c is compiled, and we use try_compile instead of try_run
-# so the resulting executable file stays available for later inspection.
+### Rationale
+# Modern C has isfinite() to detect if a given floating point value is an IEEE754 special
+# values (NaNs and infinities). Teem development, however, started before isfinite() was
+# widely available, so it uses the AIR_EXISTS() macro in air.h. Being a macro, there are
+# expressions that could do the right thing with some compiler options, but fail with
+# different options (like -ffast-math). So we jump through some hoops to rigorously check
+# if AIR_EXISTS() is really working, based on the little CMake/TestAIR_EXISTS.c test
+# program. For this to be a useful test that informs how the rest of Teem code will work,
+# TestAIR_EXISTS.c needs to be compiled the same as Teem itself will be compiled later.
+# Sadly, it was not until Teem V2 that this consistency was actually enforced (!) To
+# further help debugging, we also print out exactly how TestAIR_EXISTS.c is compiled, and
+# we use try_compile instead of try_run so the resulting executable file stays available
+# for later inspection.
#
-# (rejected but interesting debugging strategies:
-# message(STATUS "Pausing CMake so you can inspect temporary files...")
-# execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 30)
-# or
-# execute_process(COMMAND /bin/sh -c "read -p 'Press ENTER to continue...'")
-# )
+# Defines:
+# AIR_EXISTS_MACRO_FAILS -- TRUE if AIR_EXISTS() fails with current compiler settings
+
# "taex" = Test Air_EXists
set(_taex_src "${CMAKE_CURRENT_LIST_DIR}/TestAIR_EXISTS.c")
@@ -99,3 +98,10 @@
message(CHECK_FAIL "NO, it FAILS to detect IEEE754 special values")
set(AIR_EXISTS_MACRO_FAILS 1 CACHE INTERNAL "AIR_EXISTS macro fails")
endif()
+
+# (rejected but interesting debugging strategies:
+# message(STATUS "Pausing CMake so you can inspect temporary files...")
+# execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 30)
+# or
+# execute_process(COMMAND /bin/sh -c "read -p 'Press ENTER to continue...'")
+# )
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 02:12:17 UTC (rev 7394)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 04:30:02 UTC (rev 7395)
@@ -3,21 +3,21 @@
# 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:
+# 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
+# LIBM_NEEDED -- TRUE if executables must link with -lm for current library type
#
# Usage example
# include(CheckLibM)
@@ -24,7 +24,6 @@
# if(LIBM_NEEDED)
# target_link_libraries(Teem PRIVATE m)
# endif()
-#
### ------------------------------------------------------------------------
# Setup
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 02:12:20
|
Revision: 7394
http://sourceforge.net/p/teem/code/7394
Author: kindlmann
Date: 2025-09-10 02:12:17 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
more comments
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 02:09:26 UTC (rev 7393)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 02:12:17 UTC (rev 7394)
@@ -33,6 +33,7 @@
return()
endif()
+# BUILD_SHARED_LIBS informs what kind of libtiny we make
if(BUILD_SHARED_LIBS)
set(_lib_type SHARED)
else()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 02:09:30
|
Revision: 7393
http://sourceforge.net/p/teem/code/7393
Author: kindlmann
Date: 2025-09-10 02:09:26 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
fewer apostrophes
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 02:06:04 UTC (rev 7392)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 02:09:26 UTC (rev 7393)
@@ -132,7 +132,7 @@
if(_checklibm_no_libm_ok)
# ... and either it did work without `-lm`, or ...
set(LIBM_NEEDED FALSE CACHE BOOL ${_lmn_desc})
- message(STATUS "CheckLibM: don't need -lm when linking with math-using ${_lib_type} lib")
+ message(STATUS "CheckLibM: No, do NOT need -lm when linking with math-using ${_lib_type} lib")
else()
# ... it did not work without -lm.
# Does it does work *with* -lm?
@@ -141,7 +141,7 @@
if(_checklibm_with_libm_ok)
# Yes, it does work with -lm.
set(LIBM_NEEDED TRUE CACHE BOOL "${_lmn_desc}")
- message(STATUS "CheckLibM: yes, do need -lm when linking with math-using ${_lib_type} lib")
+ message(STATUS "CheckLibM: yes, DO need -lm when linking with math-using ${_lib_type} lib")
else()
# Yikes, it failed both without and with -lm. Bye.
message(FATAL_ERROR
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 02:06:08
|
Revision: 7392
http://sourceforge.net/p/teem/code/7392
Author: kindlmann
Date: 2025-09-10 02:06:04 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
now the library type of the mini sub-project test library follows BUILD_SHARED_LIBS
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 01:34:21 UTC (rev 7391)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 02:06:04 UTC (rev 7392)
@@ -33,7 +33,13 @@
return()
endif()
-set(_lmn_desc "Need to explicitly link with -lm?")
+if(BUILD_SHARED_LIBS)
+ set(_lib_type SHARED)
+else()
+ set(_lib_type STATIC)
+endif()
+
+set(_lmn_desc "Need to add -lm when linking with math-using ${_lib_type} lib?")
message(STATUS "CheckLibM: ${_lmn_desc}")
set(_checklibm_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/tmpCheckLibM")
@@ -74,7 +80,9 @@
project(CheckLibM_${suffix} C)
set(CMAKE_VERBOSE_MAKEFILE OFF)
-add_library(tiny SHARED \"${_checklibm_dir}/tiny.c\")
+# Create libtiny is shared or static, according to BUILD_SHARED_LIBS
+add_library(tiny ${_lib_type} \"${_checklibm_dir}/tiny.c\")
+# Make maintiny link only with tiny and optional extra_libs
add_executable(maintiny \"${_checklibm_dir}/maintiny.c\")
target_link_libraries(maintiny PRIVATE tiny ${extra_libs})
")
@@ -124,7 +132,7 @@
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")
+ message(STATUS "CheckLibM: don't need -lm when linking with math-using ${_lib_type} lib")
else()
# ... it did not work without -lm.
# Does it does work *with* -lm?
@@ -133,7 +141,7 @@
if(_checklibm_with_libm_ok)
# Yes, it does work with -lm.
set(LIBM_NEEDED TRUE CACHE BOOL "${_lmn_desc}")
- message(STATUS "CheckLibM: yes, math requires explicit -lm")
+ message(STATUS "CheckLibM: yes, do need -lm when linking with math-using ${_lib_type} lib")
else()
# Yikes, it failed both without and with -lm. Bye.
message(FATAL_ERROR
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 01:34:23
|
Revision: 7391
http://sourceforge.net/p/teem/code/7391
Author: kindlmann
Date: 2025-09-10 01:34:21 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
whether to link with -lm is info we can share to downstream consumers
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-10 01:33:26 UTC (rev 7390)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-10 01:34:21 UTC (rev 7391)
@@ -285,7 +285,10 @@
include(CheckLibM)
if(LIBM_NEEDED)
message(STATUS "Will explicitly link with -lm")
- target_link_libraries(Teem PRIVATE m)
+ target_link_libraries(Teem
+ PRIVATE # still link to Teem itself
+ INTERFACE m # this ensures consumers (executables) get -lm automatically
+ )
else()
message(STATUS "Do not need to link with -lm")
endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 01:33:29
|
Revision: 7390
http://sourceforge.net/p/teem/code/7390
Author: kindlmann
Date: 2025-09-10 01:33:26 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
tweak
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 01:23:48 UTC (rev 7389)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 01:33:26 UTC (rev 7390)
@@ -33,7 +33,7 @@
return()
endif()
-set(_lmn_desc "Does the platform require linking with -lm?")
+set(_lmn_desc "Need to explicitly link with -lm?")
message(STATUS "CheckLibM: ${_lmn_desc}")
set(_checklibm_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/tmpCheckLibM")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 01:23:54
|
Revision: 7389
http://sourceforge.net/p/teem/code/7389
Author: kindlmann
Date: 2025-09-10 01:23:48 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
now the AIR_EXISTS test has been moved to a separte file
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-10 01:21:31 UTC (rev 7388)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-10 01:23:48 UTC (rev 7389)
@@ -238,102 +238,8 @@
###-------------------------------------------------------------------------------------
# Configure-time test: does AIR_EXISTS() work like isfinite()?
-# A lot of work for one little macro (which GLK started using before the functionally
-# equivalent isfinite() became widely available). The little CMake/TestAIR_EXISTS.c
-# program tests the equivalent of AIR_EXISTS (but without directly using air.h's
-# AIR_EXISTS because this has to be stand-alone), to see if it can correctly detect
-# IEEE754 special values (NaNs and infinities). For this to be a useful test that informs
-# how the rest of Teem code will work, TestAIR_EXISTS.c needs to be compiled the same as
-# Teem itself will be compiled later. Sadly, it was not until Teem V2 that this
-# consistency was actually enforced (!) To further help debugging, we also print out
-# exactly how TestAIR_EXISTS.c is compiled, and we use try_compile instead of try_run
-# so the resulting executable file stays available for later inspection.
-#
-# (rejected but interesting debugging strategies:
-# message(STATUS "Pausing CMake so you can inspect temporary files...")
-# execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 30)
-# or
-# execute_process(COMMAND /bin/sh -c "read -p 'Press ENTER to continue...'")
-# )
-
-# "taex" = Test Air_EXists
-set(_taex_src "${CMAKE_CURRENT_LIST_DIR}/CMake/TestAIR_EXISTS.c")
-
-# Build flags for the probe (same as Teem itself)
-string(TOUPPER "${CMAKE_BUILD_TYPE}" _taex_BTUC)
-set(_taex_flags "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_taex_BTUC}}")
-set(_taex_me "AIR_EXISTS (compiled \"${_taex_flags}\")")
-
-# Where we want a durable copy of the compiled probe
-if(WIN32)
- set(_taex_copy "${CMAKE_BINARY_DIR}/TestAIR_EXISTS.exe")
-else()
- set(_taex_copy "${CMAKE_BINARY_DIR}/TestAIR_EXISTS")
-endif()
-
-# Remove any stale copy from previous runs
-if(EXISTS "${_taex_copy}")
- file(REMOVE "${_taex_copy}")
-endif()
-
-# Compile the probe
-message(CHECK_START "Testing whether macro ${_taex_me} detects IEEE754 special values")
-try_compile(
- _taex_compiles # boolean result: TRUE if compile succeeded
- SOURCES "${_taex_src}" # one or more source files for the test
- CMAKE_FLAGS
- "-DCMAKE_VERBOSE_MAKEFILE=ON"
- "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
- "-DCMAKE_C_FLAGS_${_taex_BTUC}=${_taex_flags}"
- "-DCMAKE_DEPENDS_USE_COMPILER=FALSE" # no -MD/-MT/-MF dependency cruft
- COPY_FILE "${_taex_copy}" # copy the built executable to a stable path
- OUTPUT_VARIABLE _taex_compile_out
- COPY_FILE_ERROR _taex_copy_error
-)
-# Always show the captured compile output, as progress indication
-string(REPLACE "\n" "\n " _taex_compile_out_indented "${_taex_compile_out}")
-message(STATUS "Compile output:\n ${_taex_compile_out_indented}")
-
-if(NOT _taex_compiles)
- message(CHECK_FAIL "compile failed")
- message(FATAL_ERROR "Could not compile ${_taex_src}")
-elseif(_taex_copy_error)
- message(CHECK_FAIL "copy failed")
- message(FATAL_ERROR "Test program compiled but could not copy: ${_taex_copy_error}")
-elseif(NOT EXISTS "${_taex_copy}")
- message(CHECK_FAIL "missing executable")
- message(FATAL_ERROR "Test program compiled but file not found at ${_taex_copy}")
-else()
- message(CHECK_PASS "compiled successfully")
-endif()
-
-# Run the test program
-message(CHECK_START "Running ${_taex_me} test program")
-# https://cmake.org/cmake/help/latest/command/execute_process.html
-execute_process(
- COMMAND "${_taex_copy}"
- RESULT_VARIABLE _taex_run_status
- OUTPUT_VARIABLE _taex_run_out
- ERROR_VARIABLE _taex_run_err
-)
-
-# Act on the results; set AIR_EXISTS_MACRO_FAILS
-if(_taex_run_status EQUAL 0)
- message(CHECK_PASS "Yes, it detects IEEE754 special values")
- set(AIR_EXISTS_MACRO_FAILS 0 CACHE INTERNAL "AIR_EXISTS macro works correctly")
-else()
- # Always show stdout/stderr from the probe as indented sub-log
- if(_taex_run_out)
- string(REPLACE "\n" "\n " _taex_run_out_indented "${_taex_run_out}")
- message(STATUS "Probe stdout:\n ${_taex_run_out_indented}")
- endif()
- if(_taex_run_err)
- string(REPLACE "\n" "\n " _taex_run_err_indented "${_taex_run_err}")
- message(STATUS "Probe stderr:\n ${_taex_run_err_indented}")
- endif()
- message(CHECK_FAIL "NO, it FAILS to detect IEEE754 special values")
- set(AIR_EXISTS_MACRO_FAILS 1 CACHE INTERNAL "AIR_EXISTS macro fails")
-endif()
+# This finishes by setting AIR_EXISTS_MACRO_FAILS
+include(CheckAirExists)
# AIR_EXISTS_MACRO_FAILS is used indirectly, below, by configure_file(airExistsConf.h)
###-------------------------------------------------------------------------------------
@@ -375,7 +281,7 @@
# (used as part of handling Windows "extern" analog)
target_compile_definitions(Teem PUBLIC "$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:TEEM_STATIC>")
-# Do we need to link with -lm?
+# Do we need to link with -lm? This finishes by setting LIBM_NEEDED
include(CheckLibM)
if(LIBM_NEEDED)
message(STATUS "Will explicitly link with -lm")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 01:21:35
|
Revision: 7388
http://sourceforge.net/p/teem/code/7388
Author: kindlmann
Date: 2025-09-10 01:21:31 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
tweak
Modified Paths:
--------------
teem/trunk/CMake/CheckAirExists.cmake
Modified: teem/trunk/CMake/CheckAirExists.cmake
===================================================================
--- teem/trunk/CMake/CheckAirExists.cmake 2025-09-10 01:20:21 UTC (rev 7387)
+++ teem/trunk/CMake/CheckAirExists.cmake 2025-09-10 01:21:31 UTC (rev 7388)
@@ -1,4 +1,5 @@
# CMake/CheckAirExists.cmake: see if AIR_EXISTS() macro works like isfinite()
+# sets AIR_EXISTS_MACRO_FAILS if not
# Copyright (C) 2025 University of Chicago
# See ../LICENSE.txt for licensing terms
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kin...@us...> - 2025-09-10 01:20:24
|
Revision: 7387
http://sourceforge.net/p/teem/code/7387
Author: kindlmann
Date: 2025-09-10 01:20:21 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
Now that we have CheckLibM.cmake in its own file, this also belows in its own file
Added Paths:
-----------
teem/trunk/CMake/CheckAirExists.cmake
Added: teem/trunk/CMake/CheckAirExists.cmake
===================================================================
--- teem/trunk/CMake/CheckAirExists.cmake (rev 0)
+++ teem/trunk/CMake/CheckAirExists.cmake 2025-09-10 01:20:21 UTC (rev 7387)
@@ -0,0 +1,100 @@
+# CMake/CheckAirExists.cmake: see if AIR_EXISTS() macro works like isfinite()
+# Copyright (C) 2025 University of Chicago
+# See ../LICENSE.txt for licensing terms
+
+# A lot of work for one little macro (which GLK started using before the functionally
+# equivalent isfinite() became widely available). The little CMake/TestAIR_EXISTS.c
+# program tests the equivalent of AIR_EXISTS (but without directly using air.h's
+# AIR_EXISTS because this has to be stand-alone), to see if it can correctly detect
+# IEEE754 special values (NaNs and infinities). For this to be a useful test that informs
+# how the rest of Teem code will work, TestAIR_EXISTS.c needs to be compiled the same as
+# Teem itself will be compiled later. Sadly, it was not until Teem V2 that this
+# consistency was actually enforced (!) To further help debugging, we also print out
+# exactly how TestAIR_EXISTS.c is compiled, and we use try_compile instead of try_run
+# so the resulting executable file stays available for later inspection.
+#
+# (rejected but interesting debugging strategies:
+# message(STATUS "Pausing CMake so you can inspect temporary files...")
+# execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 30)
+# or
+# execute_process(COMMAND /bin/sh -c "read -p 'Press ENTER to continue...'")
+# )
+
+# "taex" = Test Air_EXists
+set(_taex_src "${CMAKE_CURRENT_LIST_DIR}/TestAIR_EXISTS.c")
+
+# Build flags for the probe (same as Teem itself)
+string(TOUPPER "${CMAKE_BUILD_TYPE}" _taex_BTUC)
+set(_taex_flags "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_taex_BTUC}}")
+set(_taex_me "AIR_EXISTS (compiled \"${_taex_flags}\")")
+
+# Where we want a durable copy of the compiled probe
+if(WIN32)
+ set(_taex_copy "${CMAKE_BINARY_DIR}/TestAIR_EXISTS.exe")
+else()
+ set(_taex_copy "${CMAKE_BINARY_DIR}/TestAIR_EXISTS")
+endif()
+
+# Remove any stale copy from previous runs
+if(EXISTS "${_taex_copy}")
+ file(REMOVE "${_taex_copy}")
+endif()
+
+# Compile the probe
+message(CHECK_START "Testing whether macro ${_taex_me} detects IEEE754 special values")
+try_compile(
+ _taex_compiles # boolean result: TRUE if compile succeeded
+ SOURCES "${_taex_src}" # one or more source files for the test
+ CMAKE_FLAGS
+ "-DCMAKE_VERBOSE_MAKEFILE=ON"
+ "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
+ "-DCMAKE_C_FLAGS_${_taex_BTUC}=${_taex_flags}"
+ "-DCMAKE_DEPENDS_USE_COMPILER=FALSE" # no -MD/-MT/-MF dependency cruft
+ COPY_FILE "${_taex_copy}" # copy the built executable to a stable path
+ OUTPUT_VARIABLE _taex_compile_out
+ COPY_FILE_ERROR _taex_copy_error
+)
+# Always show the captured compile output, as progress indication
+string(REPLACE "\n" "\n " _taex_compile_out_indented "${_taex_compile_out}")
+message(STATUS "Compile output:\n ${_taex_compile_out_indented}")
+
+if(NOT _taex_compiles)
+ message(CHECK_FAIL "compile failed")
+ message(FATAL_ERROR "Could not compile ${_taex_src}")
+elseif(_taex_copy_error)
+ message(CHECK_FAIL "copy failed")
+ message(FATAL_ERROR "Test program compiled but could not copy: ${_taex_copy_error}")
+elseif(NOT EXISTS "${_taex_copy}")
+ message(CHECK_FAIL "missing executable")
+ message(FATAL_ERROR "Test program compiled but file not found at ${_taex_copy}")
+else()
+ message(CHECK_PASS "compiled successfully")
+endif()
+
+# Run the test program
+message(CHECK_START "Running ${_taex_me} test program")
+# https://cmake.org/cmake/help/latest/command/execute_process.html
+execute_process(
+ COMMAND "${_taex_copy}"
+ RESULT_VARIABLE _taex_run_status
+ OUTPUT_VARIABLE _taex_run_out
+ ERROR_VARIABLE _taex_run_err
+)
+
+# Act on the results; set AIR_EXISTS_MACRO_FAILS
+if(_taex_run_status EQUAL 0)
+ message(CHECK_PASS "Yes, it detects IEEE754 special values")
+ set(AIR_EXISTS_MACRO_FAILS 0 CACHE INTERNAL "AIR_EXISTS macro works correctly")
+else()
+ # Always show stdout/stderr from the probe as indented sub-log
+ if(_taex_run_out)
+ string(REPLACE "\n" "\n " _taex_run_out_indented "${_taex_run_out}")
+ message(STATUS "Probe stdout:\n ${_taex_run_out_indented}")
+ endif()
+ if(_taex_run_err)
+ string(REPLACE "\n" "\n " _taex_run_err_indented "${_taex_run_err}")
+ message(STATUS "Probe stderr:\n ${_taex_run_err_indented}")
+ endif()
+ message(CHECK_FAIL "NO, it FAILS to detect IEEE754 special values")
+ set(AIR_EXISTS_MACRO_FAILS 1 CACHE INTERNAL "AIR_EXISTS macro fails")
+endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|