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

Revision 62e9b6592f3f354d487b2334191fb7a534c9bd07 authored by Konrad Werys on 23 October 2018, 15:53:49 UTC, committed by Konrad Werys on 23 October 2018, 15:53:49 UTC
re-organising the private part of the repository
1 parent 4dd6cc5
  • Files
  • Changes
  • 4d61582
  • /
  • CMakeLists.txt
Raw File Download
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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:62e9b6592f3f354d487b2334191fb7a534c9bd07
directory badge Iframe embedding
swh:1:dir:4d61582b83536095b29ed8a8ccc7b4e8764cefd6
content badge Iframe embedding
swh:1:cnt:70961f071ae164b16dd02cb0f5e3c1084909b6d5
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.

  • revision
  • directory
  • content
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 ...
CMakeLists.txt
##################
### Tomato ###
##################

cmake_minimum_required (VERSION 2.8)

project (Tomato)

# The version number.
set (Tomato_VERSION_MAJOR 0)
set (Tomato_VERSION_MINOR 1)

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

# list of source files
file (GLOB_RECURSE APP_FILES app/*.c* app/*.h* app/*.t*)
file (GLOB_RECURSE LIB_FILES lib/*.c* lib/*.h* lib/*.t*)

###############
### 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 ON CACHE BOOL "")
if (USE_PRIVATE_NR2)
    add_subdirectory(${PRIVATE_NR2_DIR} ${CMAKE_BINARY_DIR}/private)
    include_directories(${PRIVATE_NR2_DIR}/lib)
endif()

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

set (BUILD_TESTING OFF CACHE INTERNAL "" FORCE)
add_subdirectory (thirdParty/libyaml)
include_directories (${yaml_BINARY_DIR}/include ${yaml_SOURCE_DIR}/include) # for windows
set(OxSmolli2_LIBS_TO_LINK ${OxSmolli2_LIBS_TO_LINK} yaml)
#target_link_libraries (TomatoExe PUBLIC yaml)

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

## VNL TODO: code behaviour with VNL off
#set(USE_VNL ON CACHE BOOL "Do you want to use VNL numerics library?")
#include(cmake/vnl.cmake)

#target_link_libraries (TomatoLib PUBLIC ${VNL_LIBRARIES})
#target_link_libraries (TomatoExe PUBLIC ${VNL_LIBRARIES})
#add_dependencies (TomatoLib vnl vnl_algo)
#add_dependencies (TomatoExe vnl vnl_algo)

# Numerical Recipes v2
set(USE_NR2 ON CACHE BOOL "Do you want to use Numerical Recipes 2 code?")
include(cmake/nr2.cmake)
#target_link_libraries (TomatoLib PUBLIC NR2)

# Numerical Recipes v3
set(USE_NR3 OFF CACHE BOOL "Do you want to use Numerical Recipes 3 code?")
include(cmake/nr3.cmake)

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

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

    find_package(ITK) # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    if (NOT ITK_FOUND)
        find_package(ITK HINTS ../ITK_install)
    endif()
    MESSAGE("ITK version:" ${ITK_VERSION})
    if (ITK_FOUND)
        set(USE_ITK ON)
        set(USE_VNL ON)
        include(${ITK_USE_FILE})
        set(OxSmolli2_LIBS_TO_LINK ${OxSmolli2_LIBS_TO_LINK} ${ITK_LIBRARIES})
    endif()
endif(USE_ITK)

###########
### VTK ###
###########

set(USE_VTK ON CACHE BOOL "Do you want to use VTK?")
list (FIND ITK_LIBRARIES "ITKVtkGlue" _index)
# use vtk only if ITK is present
if(USE_VTK)
    set(USE_VTK OFF)
    if(_index GREATER -1)
        find_package(VTK)
        MESSAGE("VTK version:" ${VTK_VERSION})
        if (VTK_FOUND)
            set(USE_VTK ON)
            include(${VTK_USE_FILE})
            set(OxSmolli2_LIBS_TO_LINK ${OxSmolli2_LIBS_TO_LINK} ${VTK_LIBRARIES})
        endif()
    endif()
endif(USE_VTK)

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

MESSAGE("CXX_STANDARD_98: " ${CXX_STANDARD_98})
MESSAGE("USE_ITK:         " ${USE_ITK})
MESSAGE("USE_VTK:         " ${USE_VTK})
MESSAGE("USE_VNL:         " ${USE_VNL})
MESSAGE("USE_PRIVATE_NR2: " ${USE_PRIVATE_NR2})
MESSAGE("USE_NR2:         " ${USE_NR2})
MESSAGE("USE_NR3:         " ${USE_NR3})

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

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

add_library (TomatoLib ${APP_FILES} ${LIB_FILES})
add_executable (TomatoExe ${APP_FILES} ${LIB_FILES})

###############
### Linking ###
###############

target_link_libraries (TomatoLib PUBLIC ${OxSmolli2_LIBS_TO_LINK})
set(OxSmolli2_LIBS_TO_LINK ${OxSmolli2_LIBS_TO_LINK} TomatoLib)
target_link_libraries (TomatoExe PUBLIC ${OxSmolli2_LIBS_TO_LINK})

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

#set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE INTERNAL "" FORCE)
install (TARGETS TomatoLib DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install (FILES ${LIB_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/install/OxShmolli)
install (TARGETS TomatoExe DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

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

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

#############################
### DISPLAY ALL VARIABLES ###
#############################

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





The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

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