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

  • cf68df9
  • /
  • 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
swh:1:cnt:61309dc1d33fa9568b853b7154229050b423d95e
directory badge
swh:1:dir:cf68df97fc3e6a46bf839993e76666f3036288ba

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.24)
project(setgraph)
set(CMAKE_CXX_STANDARD 20)

include(FetchContent)
FetchContent_Declare(
        unordered_dense
        GIT_REPOSITORY https://github.com/martinus/unordered_dense.git
        GIT_TAG 94156450d991515faa07ccd3823a2592c000e49f
)
FetchContent_MakeAvailable(unordered_dense)
find_package(range-v3 REQUIRED)

get_directory_property(SETGRAPH_PARENT_DIRECTORY PARENT_DIRECTORY)
mark_as_advanced(SETGRAPH_PARENT_DIRECTORY)
set(SETGRAPH_CREATE_DOC On CACHE BOOL "add documentation target")
if(SETGRAPH_PARENT_DIRECTORY)
    set(SETGRAPH_CREATE_DOC Off)
endif()
if(SETGRAPH_CREATE_DOC)
    find_package(Doxygen)
    set(DOXYGEN_JAVADOC_AUTOBRIEF ON)
    doxygen_add_docs(doc include)
endif()

add_library(setgraph INTERFACE test/testBoostIntegration.cpp)
target_include_directories(setgraph INTERFACE include)
target_link_libraries(setgraph INTERFACE range-v3 unordered_dense::unordered_dense)

find_package(Boost COMPONENTS graph)

if (Boost_GRAPH_FOUND)
    add_library(setgraph-boost INTERFACE)
    target_link_libraries(setgraph-boost INTERFACE setgraph Boost::graph)
else()
    message("boost graph not found")
endif()

enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
add_subdirectory(test)

back to top

Software Heritage — Copyright (C) 2015–2026, 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