mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-07 21:20:40 +02:00
docs
This commit is contained in:
parent
9ab61cac4e
commit
35c6706b3c
@ -114,6 +114,7 @@ if (AARE_FETCH_FMT)
|
|||||||
USES_TERMINAL_DOWNLOAD TRUE
|
USES_TERMINAL_DOWNLOAD TRUE
|
||||||
)
|
)
|
||||||
set(FMT_INSTALL ON CACHE BOOL "")
|
set(FMT_INSTALL ON CACHE BOOL "")
|
||||||
|
set(FMT_CMAKE_DIR "")
|
||||||
FetchContent_MakeAvailable(fmt)
|
FetchContent_MakeAvailable(fmt)
|
||||||
set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
|
set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
install(TARGETS fmt
|
install(TARGETS fmt
|
||||||
|
19
docs/src/Consume.rst
Normal file
19
docs/src/Consume.rst
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Use from C++
|
||||||
|
========================
|
||||||
|
|
||||||
|
There are a few different way to use aare in your C++ project. Which one you choose
|
||||||
|
depends on how you intend to work with the library and how you manage your dependencies.
|
||||||
|
|
||||||
|
|
||||||
|
Install and use cmake with find_package(aare)
|
||||||
|
-------------------------------------------------
|
||||||
|
|
||||||
|
https://github.com/slsdetectorgroup/aare-examples
|
||||||
|
|
||||||
|
.. include:: _install.rst
|
||||||
|
|
||||||
|
|
||||||
|
Use as a submodule
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Coming soon...
|
@ -1,8 +1,17 @@
|
|||||||
|
****************
|
||||||
Installation
|
Installation
|
||||||
===============
|
****************
|
||||||
|
|
||||||
|
.. attention ::
|
||||||
|
|
||||||
|
- https://cliutils.gitlab.io/modern-cmake/README.html
|
||||||
|
|
||||||
conda/mamaba
|
conda/mamaba
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
This is the recommended way to install aare. Using a package manager makes it easy to
|
||||||
|
switch between versions and is (one of) the most convenient way to install up to date
|
||||||
|
dependencies on older distributions.
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
|
|
||||||
@ -16,8 +25,11 @@ conda/mamaba
|
|||||||
conda install aare=2024.11.11.dev0 -c slsdetectorgroup
|
conda install aare=2024.11.11.dev0 -c slsdetectorgroup
|
||||||
|
|
||||||
|
|
||||||
cmake (development install)
|
cmake build (development install)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
If you are working on aare or want to test our a version that doesn't yet have
|
||||||
|
a conda package. Build using cmake and then run from the build folder.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -32,30 +44,23 @@ cmake (development install)
|
|||||||
make -j4
|
make -j4
|
||||||
|
|
||||||
|
|
||||||
# add the build folder to your PYTHONPATH
|
# add the build folder to your PYTHONPATH and then you should be able to
|
||||||
|
# import aare in python
|
||||||
|
|
||||||
cmake install and use in your C++ project
|
cmake build + install and use in your C++ project
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. code-block:: bash
|
.. warning ::
|
||||||
|
|
||||||
#build and install aare
|
When building aare with default settings we also include fmt and nlohmann_json.
|
||||||
git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http...
|
Installation to a custom location is highly recommended.
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
|
|
||||||
#configure using cmake
|
|
||||||
cmake ../aare -DCMAKE_INSTALL_PREFIX=/where/to/put/aare
|
|
||||||
|
|
||||||
#build (replace 4 with the number of threads you want to use)
|
|
||||||
make -j4
|
|
||||||
|
|
||||||
#install
|
|
||||||
make install
|
|
||||||
|
|
||||||
|
|
||||||
#Now configure your project
|
.. note ::
|
||||||
cmake .. -DCMAKE_PREFIX_PATH=SOME_PATH
|
|
||||||
|
It is also possible to install aare with conda and then use in your C++ project.
|
||||||
|
|
||||||
|
.. include:: _install.rst
|
||||||
|
|
||||||
|
|
||||||
cmake options
|
cmake options
|
||||||
|
23
docs/src/_install.rst
Normal file
23
docs/src/_install.rst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
#build and install aare
|
||||||
|
git clone git@github.com:slsdetectorgroup/aare.git --branch=developer #or using http...
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
#configure using cmake
|
||||||
|
cmake ../aare -DCMAKE_INSTALL_PREFIX=/where/to/put/aare
|
||||||
|
|
||||||
|
#build (replace 4 with the number of threads you want to use)
|
||||||
|
make -j4
|
||||||
|
|
||||||
|
#install
|
||||||
|
make install
|
||||||
|
|
||||||
|
#Go to your project
|
||||||
|
cd /your/project/source
|
||||||
|
|
||||||
|
#Now configure your project
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_PREFIX_PATH=SOME_PATH
|
@ -8,10 +8,11 @@ AARE
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Installation
|
:caption: Installation
|
||||||
:maxdepth: 1
|
:maxdepth: 3
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
Requirements
|
Requirements
|
||||||
|
Consume
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user