Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add docs target #11

Merged
merged 1 commit into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
28 changes: 0 additions & 28 deletions CHANGELOG.md

This file was deleted.

32 changes: 32 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
*********
Changelog
*********
.. View rendered on https://fairrootgroup.github.io/FairCMakeModules/latest/changelog.html

Unreleased
==========

Changed
-------

* :command:`find_package2`'s option ``ADD_REQUIREMENTS_OF`` is now a no-op. All
known requirements are merged by default.

New
---

* In module :module:`FairFindPackage2`

* List FairCMakeModules as package dependency
* Macro :command:`find_package2_implicit_dependencies`
* Function :command:`fair_generate_package_dependencies`

* Module :module:`FairFormattedOutput`

**v0.1.0 (beta)** 2021-04-24
============================

New
---

* Module :module:`FairFindPackage2`
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ project(FairCMakeModules VERSION 0.1.0 LANGUAGES CXX
HOMEPAGE_URL "https://github.com/FairRootGroup/FairCMakeModules")
message(STATUS "${PROJECT_NAME} Version ${PROJECT_VERSION}")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(CTest)
Expand All @@ -28,6 +32,11 @@ set(PROJECT_INSTALL_MODULESDIR "${PROJECT_INSTALL_DATADIR}/modules")
add_subdirectory(src)
add_subdirectory(tests)

find_program(SPHINX_EXECUTABLE NAMES sphinx-build)
if(SPHINX_EXECUTABLE)
add_subdirectory(docs)
endif()

configure_package_config_file(
"cmake/${PROJECT_NAME}Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
Expand All @@ -49,7 +58,7 @@ install(
install(
FILES
README.md
CHANGELOG.md
CHANGELOG.rst
DESTINATION "${CMAKE_INSTALL_DOCDIR}")


Expand Down
46 changes: 2 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
# FairCMakeModules

CMake Modules developed in the context of various FAIR projects
This project maintains CMake Modules developed in the context of various [FAIR](https://www.gsi.de/en/researchaccelerators/fair) software projects.

## Installation

```
git clone https://github.com/FairRootGroup/FairCMakeModules
cmake -S FairCMakeModules -B FairCMakeModules_build -DCMAKE_INSTALL_PREFIX=FairCMakeModules_install
cmake --build FairCMakeModules_build --target install
```

## Usage

In your project, discover this package with [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html#full-signature-and-config-mode) (see the official CMake docs for the full call signature of `find_package`):

```
find_package(FairCMakeModules REQUIRED)
```

Then [`include`](https://cmake.org/cmake/help/latest/command/include.html) any module you would like to use

```
include(<modulename>)
```

Available modules are:

* [FairFindPackage2](src/modules/FairFindPackage2.cmake)

## License

```
################################################################################
# Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
# copied verbatim in the file "LICENSE" #
################################################################################
```

## Contributing

For comments, questions, and bug reports please [open a github issue](https://github.com/FairRootGroup/FairCMakeModules/issues/new).

For code contributions and bug fixes please create [a github pull request](https://github.com/FairRootGroup/FairCMakeModules/pulls) against the `main` branch. Read our [notes for developers](docs/development.md).
:pushpin: **Get started by visiting the [:closed_book: Documentation](https://fairrootgroup.github.io/FairCMakeModules/)**
20 changes: 20 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################################
# Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
# copied verbatim in the file "LICENSE" #
################################################################################

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

set(builder html)
add_custom_target(docs
COMMAND ${SPHINX_EXECUTABLE} -a -E -c "${CMAKE_CURRENT_BINARY_DIR}" -b ${builder}
${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/${builder}"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation"
VERBATIM
)
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. default-domain:: cmake
.. include:: ../CHANGELOG.rst
Loading