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/penn-graphics-research/ziran2019
11 June 2024, 08:44:58 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
Revision 8d3d27cd17bbceab18c317820dbe595178f6312a authored by fangy14 on 06 November 2019, 07:20:57 UTC, committed by fangy14 on 06 November 2019, 07:20:57 UTC
open source
0 parent
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • 8d3d27cd17bbceab18c317820dbe595178f6312a
    No releases to show
  • 0bca774
  • /
  • Scripts
  • /
  • 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 ...

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
  • snapshot
origin badgerevision badge
swh:1:rev:8d3d27cd17bbceab18c317820dbe595178f6312a
origin badgedirectory badge Iframe embedding
swh:1:dir:b1342126a4d6472fad3f6575a53883ef3afe21f6
origin badgecontent badge Iframe embedding
swh:1:cnt:a20c71647bff7e0722e6a9faec0d927cfb841a9c
origin badgesnapshot badge
swh:1:snp:597f10704966a63e22a6690fc91719ea5d363ec6

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
  • 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: 8d3d27cd17bbceab18c317820dbe595178f6312a authored by fangy14 on 06 November 2019, 07:20:57 UTC
open source
Tip revision: 8d3d27c
CMakeLists.txt
set(GIT_PATH "NOTSET" CACHE STRING "Absolute path to the git executable")
set(PYTHON_NAME "python" CACHE STRING "Name of the python executable, eg. python2")
set(PYTHON_PATH "NOTSET" CACHE STRING "Absolute path to the python executable")
set(CLANGFORMAT_PATH "NOTSET" CACHE STRING "Absolute path to the clang-format executable")
set(CLANGFORMAT_STYLE "file" CACHE STRING "Paremter pass to clang-format -style=<here>")
set(IGNORE_LIST "" CACHE STRING "Semi colon separeted list of directories to ignore")

if("${GIT_PATH}" STREQUAL "NOTSET")
	find_program(FIND_GIT git)
	if("${FIND_GIT}" STREQUAL "FIND_GIT-NOTFOUND")
		message(FATAL_ERROR "Could not find 'git' please set GIT_PATH:STRING")
	else()
		set(GIT_PATH ${FIND_GIT})
		message(STATUS "Found: ${GIT_PATH}")
	endif()
else()
	if(NOT EXISTS ${GIT_PATH})
		message(WARNING "Could not find git: ${GIT_PATH}")
	else()
		message(STATUS "Found: ${GIT_PATH}")
	endif()
endif()

if("${PYTHON_PATH}" STREQUAL "NOTSET")
	find_program(FIND_PYTHON ${PYTHON_NAME})
	if("${FIND_PYTHON}" STREQUAL "FIND_PYTHON-NOTFOUND")
		message(FATAL_ERROR "Could not find '${PYTHON_NAME}' please set PYTHON_PATH:STRING")
	else()
		set(PYTHON_PATH ${FIND_PYTHON})
		message(STATUS "Found: ${PYTHON_PATH}")
	endif()
else()
	if(NOT EXISTS ${PYTHON_PATH})
		message(WARNING "Could not find python: ${PYTHON_PATH}")
	else()
		message(STATUS "Found: ${PYTHON_PATH}")
	endif()
endif()

if("${CLANGFORMAT_PATH}" STREQUAL "NOTSET")
	find_program(FIND_CLANGFORMAT clang-format)
	if("${FIND_CLANGFORMAT}" STREQUAL "FIND_CLANGFORMAT-NOTFOUND")
		message(FATAL_ERROR "Could not find 'clang-format' please set CLANGFORMAT_PATH:STRING")
	else()
		set(CLANGFORMAT_PATH ${FIND_CLANGFORMAT})
		message(STATUS "Found: ${CLANGFORMAT_PATH}")
	endif()
else()
	if(NOT EXISTS ${CLANGFORMAT_PATH})
		message(WARNING "Could not find clang-format: ${CLANGFORMAT_PATH}")
	else()
		message(STATUS "Found: ${CLANGFORMAT_PATH}")
	endif()
endif()

set(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/git-cmake-format.py)
string(REGEX REPLACE "\\\\" "/" GIT_PATH ${GIT_PATH})
string(REGEX REPLACE "\\\\" "/" PYTHON_PATH ${PYTHON_PATH})
string(REGEX REPLACE "\\\\" "/" CLANGFORMAT_PATH ${CLANGFORMAT_PATH})

execute_process(COMMAND git rev-parse --show-toplevel
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  OUTPUT_VARIABLE GIT_ROOT
  OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT GIT_ROOT)
  message(WARNING "Not in a git repository")
else()
  message(STATUS "Found git root: ${GIT_ROOT}")
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/git-pre-commit-hook
    ${GIT_ROOT}/.git/hooks/pre-commit)
  if(EXISTS ${GIT_ROOT}/Working)
    execute_process(COMMAND git rev-parse --show-toplevel
      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Working
      OUTPUT_VARIABLE GIT_WORKING_ROOT
      OUTPUT_STRIP_TRAILING_WHITESPACE)

    configure_file(
      ${CMAKE_CURRENT_SOURCE_DIR}/git-pre-commit-hook
      ${GIT_ROOT}/Working/.git/hooks/pre-commit)
  endif()
endif()

add_custom_target(format ALL
	${PYTHON_PATH} ${SCRIPT} --cmake ${GIT_PATH} ${CLANGFORMAT_PATH} -style=${CLANGFORMAT_STYLE} -ignore=${IGNORE_LIST}
	WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
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 ...

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