Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/ElsevierSoftwareX/SOFTX_2019_219
07 July 2024, 10:26:45 UTC
  • Code
  • Branches (11)
  • Releases (5)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/T2
    • refs/heads/develop
    • refs/heads/developCI
    • refs/heads/developCI2
    • refs/heads/developCI3
    • refs/heads/gh-pages
    • refs/heads/master
    • refs/heads/newBuild
    • refs/tags/v0.1
    • refs/tags/v0.11
    • refs/tags/v0.4
    • v0.4.3
    • v0.4.2
    • v0.4.1
    • v0.3
    • v0.2
  • 525e82e
  • /
  • CMakeLists.txt
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:2ed7dfed268367c0178e44affab8e7e2a31509a3
origin badgedirectory badge Iframe embedding
swh:1:dir:525e82ec0ff53d8a559499d02e7fdb981e4f4db6
origin badgerevision badge
swh:1:rev:a763b81ee81810f5fa544165d5053bde478b2dbd
origin badgesnapshot badge
swh:1:snp:e6d42e6731ce66e3c09de07ac49964c03139e990
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: a763b81ee81810f5fa544165d5053bde478b2dbd authored by Konrad Werys on 28 November 2019, 13:47:50 UTC
feat: one pixel calculation with toamtooptions v10
Tip revision: a763b81
CMakeLists.txt
##############
### Tomato ###
##############
# you can build tomato with command:
# cmake .
#       -DCMAKE_BUILD_TYPE=RELEASE
#       -DCMAKE_INSTALL_PREFIX="install"
# additionally for osx:
#       -DCMAKE_MACOSX_RPATH=1
# additionally for windows:
#       -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
# additionally for linux:
#       -DCMAKE_POSITION_INDEPENDENT_CODE=ON
# see .travis.yml and appveyor.yml for examples
#
# Konrad Werys

cmake_minimum_required (VERSION 2.8)

project (Tomato)

# The version number
set (Tomato_VERSION_MAJOR 0)
set (Tomato_VERSION_MINOR 5)

# Compiler flags
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_STANDARD 98 CACHE STRING "")
if (CMAKE_CXX_STANDARD EQUAL 98)
    set (CXX_STANDARD_98 ON) # flag used in the code
endif()

# RPATH preparation for the executables
set(CMAKE_INSTALL_RPATH
        @executable_path
        @executable_path/lib
        @executable_path/../lib
        @loader_path
        @loader_path/lib
        @loader_path/../lib
        $ORIGIN
        $ORIGIN/lib
        $ORIGIN/../lib/)

#############################
### DOWNLOAD DEPENDENCIES ###
#############################

# scripts to download pre-compiled dependencis, running only if DOWNLOAD_DEPENDENCIES is ON
set(DOWNLOAD_DEPENDENCIES ON CACHE BOOL "Do you want to download the dependencies?")
include(cmake/downloadItk.cmake)
include(cmake/downloadLmfit.cmake)

##################
### list files ###
##################

# list of source files TODO: do not use glob, as it is not recommended https://cmake.org/cmake/help/latest/command/file.html#filesystem
file (GLOB_RECURSE APP_FILES app/*.c* app/*.h* app/*.t*)
file (GLOB_RECURSE LIB_FILES lib/*.c* lib/*.h* lib/*.t*)
file (GLOB_RECURSE API_FILES lib/*.h app/*.h lib/KWUtil.hxx)

###############
### PRIVATE ###
###############

# unfortunatelly I cannot publish numerical recipes code according to numerical recipes licence
set(PRIVATE_NR2_DIR ../tomato_private CACHE PATH "")
set(USE_PRIVATE_NR2 OFF CACHE BOOL "")
if (USE_PRIVATE_NR2)
    add_subdirectory(${PRIVATE_NR2_DIR} ${CMAKE_BINARY_DIR}/private)
    include_directories(${PRIVATE_NR2_DIR}/lib)
endif()

############
### YAML ###
############

set(USE_YAML ON CACHE BOOL "Do you want to use yaml?")
include(cmake/libyaml.cmake)

###############
### Fitting ###
###############

# lmfit currently not on windows
set(USE_LMFIT ON CACHE BOOL "Do you want to use LMFIT?")
include(cmake/lmfit.cmake)

###########
### ITK ###
###########

set(USE_ITK ON CACHE BOOL "Do you want to use ITK?")

if(USE_ITK)
    set(USE_ITK OFF)
    set(USE_VNL OFF)
    find_package(ITK HINTS ${ITK_DIR_HINTS})
    MESSAGE("ITK version:" ${ITK_VERSION})
    if (ITK_FOUND)
        set(USE_ITK ON)
        set(USE_VNL ON)
        include(${ITK_USE_FILE})
        set(TOMATO_LIBS_TO_LINK ${TOMATO_LIBS_TO_LINK} ${ITK_LIBRARIES})
    endif()
else()
    set(USE_VNL OFF)
endif(USE_ITK)

####################
### MAIN PROGRAM ###
####################

set(Tomato_BUILD_TESTING ON CACHE BOOL "Do you want to build Tomato tests?")

set(BUILD_APP OFF)
if(USE_ITK AND  USE_YAML)
    set(BUILD_APP ON)
endif()

MESSAGE("CXX_STANDARD_98:       " ${CXX_STANDARD_98})
MESSAGE("DOWNLOAD_DEPENDENCIES: " ${DOWNLOAD_DEPENDENCIES})
MESSAGE("USE_ITK:               " ${USE_ITK})
MESSAGE("USE_VNL:               " ${USE_VNL})
MESSAGE("USE_PRIVATE_NR2:       " ${USE_PRIVATE_NR2})
MESSAGE("USE_LMFIT:             " ${USE_LMFIT})
MESSAGE("USE_YAML:              " ${USE_YAML})
MESSAGE("BUILD_APP:             " ${BUILD_APP})
MESSAGE("Tomato_BUILD_TESTING:  " ${Tomato_BUILD_TESTING})
MESSAGE("CMAKE_INSTALL_PREFIX:  " ${CMAKE_INSTALL_PREFIX})

# configure a header file to pass some of the CMake settings to the source code
configure_file ("${PROJECT_SOURCE_DIR}/cmake/CmakeConfigForTomato.h.in" "${PROJECT_BINARY_DIR}/CmakeConfigForTomato.h")
set (LIB_FILES ${LIB_FILES} "${PROJECT_BINARY_DIR}/CmakeConfigForTomato.h")
set (API_FILES ${API_FILES} "${PROJECT_BINARY_DIR}/CmakeConfigForTomato.h")

#################
### TOMATOLIB ###
#################

# include
include_directories (lib)
include_directories ("${PROJECT_BINARY_DIR}") # for the configuration header

# target
add_library (TomatoLib SHARED ${LIB_FILES})

#link
target_link_libraries (TomatoLib ${TOMATO_LIBS_TO_LINK})
set(TOMATO_LIBS_TO_LINK ${TOMATO_LIBS_TO_LINK} TomatoLib)

# generating TomatoLib_export.h
include(GenerateExportHeader)
generate_export_header(TomatoLib)
set(API_FILES ${API_FILES} ${PROJECT_SOURCE_DIR}/cmake/tomatolib_export.h) # to make tomatolib_export.h available in installation step

#################
### TOMATOAPP ###
#################

if(BUILD_APP)

    # include
    include_directories (app)

    # target
    add_executable (TomatoExe ${APP_FILES} ${LIB_FILES})

    # link
    target_link_libraries (TomatoExe ${TOMATO_LIBS_TO_LINK})

endif()

##################
### Installing ###
##################

install (TARGETS TomatoLib
            RUNTIME DESTINATION bin
            LIBRARY DESTINATION lib
            ARCHIVE DESTINATION lib)
install (FILES ${API_FILES} DESTINATION include) # headers
if(BUILD_APP)
    install (TARGETS TomatoExe DESTINATION bin)
endif()

###############
### TESTING ###
###############

if(Tomato_BUILD_TESTING AND USE_YAML)
    add_subdirectory (tests)
    install(TARGETS TomatoLib DESTINATION tests)
endif()

##############################
#### DISPLAY ALL VARIABLES ###
##############################
#
##get_cmake_property (_variableNames VARIABLES)
##list (SORT _variableNames)
##foreach (_variableName ${_variableNames})
##    message (STATUS "${_variableName}=${${_variableName}}")
##endforeach()

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top