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

  • 40d4000
  • /
  • CMakeLists.txt
Raw File Download

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
content badge Iframe embedding
swh:1:cnt:0341842a617b2fb077e7da665fbd0e73f34ec33a
directory badge Iframe embedding
swh:1:dir:40d4000cd5f3302b2d037401280dcf1bea2c8b31

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
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
cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR)
project(tdc)

# enable tests
enable_testing()

# include CMake modules
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules")

# extlib
set(TDC_EXTLIB_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extlib")
set(TDC_EXTLIB_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/extlib")

# build flags
set(CXX_STANDARD c++17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=gnu++17 ${GCC_WARNINGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb")

# proper std::filesystem linking for broken g++8
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    link_libraries(stdc++fs)
endif()

# build type
if(NOT CMAKE_BUILD_TYPE)
    message(STATUS "CMAKE_BUILD_TYPE not defined - defaulting to Debug.")
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
    message(STATUS "CMAKE_BUILD_TYPE is Release")
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
    message(STATUS "CMAKE_BUILD_TYPE is Debug")
else()
    message(FATAL_ERROR "Unsupported CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
endif()

# init submodules
include(InitSubmodules)

# include extlibs
include_directories(${TDC_EXTLIB_SOURCE_DIR}/ips4o)
include_directories(${TDC_EXTLIB_SOURCE_DIR}/json/single_include)
include_directories(${TDC_EXTLIB_SOURCE_DIR}/robin-hood-hashing/src/include)
add_subdirectory(${TDC_EXTLIB_SOURCE_DIR}/tlx)
include_directories(${TDC_EXTLIB_SOURCE_DIR}/tlx)

# find optional packages
find_package(LEDA)
find_package(STree)

# include
include_directories(${CMAKE_SOURCE_DIR}/include)

# subdirectories
add_subdirectory(benchmark)
add_subdirectory(docs)
add_subdirectory(examples)
add_subdirectory(src)

back to top

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— Content policy— Contact— JavaScript license information— Web API