Skip to content

Commit

Permalink
Release .
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot-abi committed Dec 3, 2024
1 parent d20d55f commit e067bca
Show file tree
Hide file tree
Showing 95 changed files with 1,617 additions and 651 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
CHANGE LOG: Zinc Library

v4.2.0
Fix bug for export of single element line to webGL.
Fix undefined element field segfault.
Add docs target for building the documentation with Sphinx.
Rename Zinc_DEVELOPER_VERSION to Zinc_VERSION_DEVELOPER.
Upgrade numerical derivative test answers to a quartic interpolation.
Re-introduce viewing volume API.
Replace use of sprintf with snprintf.

v4.1.2
Fix bug with loading images with that have a depth that are not integrals of a byte.

Expand Down
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ if(POLICY CMP0086)
endif()

# This is the project name and shows up in IDEs
project(Zinc VERSION 4.1.2 LANGUAGES C CXX)
project(Zinc VERSION 4.2.0 LANGUAGES C CXX)

# Set this to the development release or release candidate version.
set(Zinc_DEVELOPER_VERSION "")
set(Zinc_VERSION_DEVELOPER "")

# The name for the project seen in directory paths
set(ZINC_BASE_NAME zinc)
Expand Down Expand Up @@ -243,6 +243,8 @@ if(ZINC_BUILD_TESTS)
add_subdirectory(tests)
endif()

add_subdirectory(docs)

string(REGEX REPLACE ";" " " INCLUDE_DIRS "${INCLUDE_DIRS}" )
string(REGEX REPLACE ";" " " DEPENDENT_DEFINITIONS "${DEPENDENT_DEFINITIONS}")

Expand Down Expand Up @@ -321,7 +323,7 @@ if(ZINC_PRINT_CONFIG_SUMMARY)
message(STATUS "=====================================================")
message(STATUS "Zinc has been configured with the following settings:")
message(STATUS "")
message(STATUS " Version: '${Zinc_VERSION}${Zinc_DEVELOPER_VERSION}'")
message(STATUS " Version: '${Zinc_VERSION}${Zinc_VERSION_DEVELOPER}'")
message(STATUS " Source revision: '${ZINC_REVISION}'")
message(STATUS " Target type: '${ZINC_BUILD_STRING}'")
message(STATUS " Build type: '${CMAKE_BUILD_TYPE}'")
Expand Down
1 change: 1 addition & 0 deletions cmake/EnvironmentChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include(CheckCXXCompilerFlag)
get_property(IS_MULTI_CONFIG_ENV GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)

find_package(Python COMPONENTS Interpreter)
find_package(Sphinx)

find_program(VALGRIND_EXE NAMES ${PREFERRED_VALGRIND_NAMES} valgrind)
find_program(FIND_EXE NAMES ${PREFERRED_FIND_NAMES} find)
Expand Down
14 changes: 14 additions & 0 deletions cmake/FindSphinx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
find_program(Sphinx_EXECUTABLE NAMES ${SPHINX_PREFERRED_NAMES} sphinx-build sphinx-build2
HINTS
$ENV{SPHINX_DIR}
PATH_SUFFIXES bin Scripts
DOC "Sphinx documentation generator"
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(Sphinx DEFAULT_MSG
Sphinx_EXECUTABLE
)

mark_as_advanced(Sphinx_EXECUTABLE)
2 changes: 1 addition & 1 deletion cmake/ZincPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

SET( CPACK_PACKAGE_NAME ${PROJECT_NAME} )
SET( ZINC_PACKAGE_VERSION "${Zinc_VERSION}${Zinc_DEVELOPER_VERSION}" )
SET( ZINC_PACKAGE_VERSION "${Zinc_VERSION}${Zinc_VERSION_DEVELOPER}" )
SET( CPACK_PACKAGE_VERSION "${ZINC_PACKAGE_VERSION}" )

SET(ZINC_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
Expand Down
53 changes: 53 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

if(SPHINX_FOUND)
set(SPHINX_DOCS_TARGET project_docs)

if(NOT DEFINED SPHINX_THEME)
set(SPHINX_THEME theme)
endif()

if(NOT DEFINED SPHINX_THEME_DIR)
set(SPHINX_THEME_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
endif()

string(TIMESTAMP SPHINX_YEAR "%Y")

# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")

# Sphinx cache with pickled ReST documents
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")

# HTML output directory
set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.in.py"
"${BINARY_BUILD_DIR}/conf.py"
@ONLY)

add_custom_target(${SPHINX_DOCS_TARGET}
COMMAND ${SPHINX_EXECUTABLE}
-q -b html
-c "${BINARY_BUILD_DIR}"
-d "${SPHINX_CACHE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
"${SPHINX_HTML_DIR}"
COMMENT "Building HTML documentation with Sphinx")

add_custom_target(serve_docs
DEPENDS ${SPHINX_DOCS_TARGET}
COMMAND ${Python_EXECUTABLE} -m http.server
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
COMMENT "Serving documentation.")
endif()

if(SPHINX_FOUND)
add_custom_target(docs
DEPENDS ${SPHINX_DOCS_TARGET}
COMMENT "Generating documentation")
add_custom_target(clean_docs
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/html
COMMENT "Cleaning documentation")
endif()

265 changes: 265 additions & 0 deletions docs/conf.in.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
# -*- coding: utf-8 -*-
#

import sys
import os

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.extlinks',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'

# These are the shorthand for external links. Use them in the other pages as:
# :shortcut:`Shortcut text <extra string if needed>` NB space before <
# Declare below as:
# 'shortcut': ('http://linkhere/%s', None), NB have to put the string insertion %s to make it work
extlinks = {
# NB for deployment outside of the cmlibs.org domain, you will need to include the root of the href for the
# :api: shortcut here. This only works internally.
'buildbot': ('https://buildbot.net/%s', None),
}

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'Zinc'
copyright = u'@SPHINX_YEAR@, Zinc Contributors'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '@Zinc_VERSION_MAJOR@.@Zinc_VERSION_MINOR@'
# The full version, including alpha/beta/rc tags.
release = '@Zinc_VERSION_MAJOR@.@Zinc_VERSION_MINOR@.@Zinc_VERSION_PATCH@@Zinc_DEVELOPER_VERSION@'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []

# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False

# If true, enable figure numbering
numfig = True

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = '@SPHINX_THEME@'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['@SPHINX_THEME_DIR@']

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True

# If false, no index is generated.
#html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'zincdoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'Zinc.tex', u'Zinc Documentation',
u'Zinc Contributors', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'Zinc', u'Zinc Documentation',
[u'Zinc Contributors'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Zinc', u'Zinc Documentation',
u'Zinc Contributors', 'Zinc', 'C++ library for finite element modelling and visualisation.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

Loading

0 comments on commit e067bca

Please sign in to comment.