Skip to content

Commit

Permalink
Merge pull request #330 from clEsperanto/update-documentation
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
StRigaud committed Aug 22, 2024
2 parents b34183f + be30364 commit 329f6d5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
25 changes: 25 additions & 0 deletions docs/source/compilation.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Compilation
-----------

in Terminal
~~~~~~~~~~~

We rely on CMake to build the library.
CMake is a cross-platform build system that can generate build files for different build systems like ``make``, ``ninja``, ``Visual Studio``, ``Xcode``, etc.
We encourage you to refer to your favorite IDE documentation to learn how to use CMake with it.
Expand Down Expand Up @@ -39,6 +42,28 @@ The ``--parallel`` flag is used to specify the number of parallel builds to use.

Once the build is done, you can run the tests if they were built.

in VScode
~~~~~~~~~

To build the library using VScode, which we advise if you are planning to contribute to the library and you are not familiar with other IDEs or Cpp projects in general, you can follow the steps below:

- Install the requirements mentioned in the `Requirements <requirements>`__ section.
- Install VScode from `here <https://code.visualstudio.com/>`__ and the extension ``C/C++ Extension Pack`` by Microsoft
- Open the repository folder in VScode.
- Select the CMake presets configuration from the bottom action bar:

- Project Generator: ``Ninja``, ``Makefiles``, ``Visual Studio``, etc.
- Project Build Type: ``Debug``, ``Release``, etc.
- Project Test type: ``Ctest Debug``, ``Ctest Release``, etc.

- You can now configure the project by calling the ``CMake: Configure`` command from the command palette (``Ctrl+Shift+P``).
- Once configured, you can build the project by calling the ``CMake: Build`` command from the command palette (``Ctrl+Shift+P``).

.. note::

You can also refere to this issue for more information: `Issue #320 <https://github.com/clEsperanto/CLIc/issues/320#issuecomment-2225234326>`__


Configuration options
~~~~~~~~~~~~~~~~~~~~~

Expand Down
8 changes: 0 additions & 8 deletions docs/source/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,3 @@ Additionally, the CI/CD pipeline runs tests on each pull request.
.. note::

To run a specific test, use the ``ctest -C Debug -R {test_name}`` command.


Code formatting
---------------

The code formatting is managed by the `clang-format` tool.
The configuration file is located at the root of the repository and is named `.clang-format`.
For more information on how to use `clang-format`, please refer to the `official documentation <https://clang.llvm.org/docs/ClangFormat.html>`__.
5 changes: 4 additions & 1 deletion docs/source/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ To compile the library, you'll need the following software:
- On macOS, you can install the `Xcode command line tools <https://developer.apple.com/xcode/resources/>`__
- On Linux, you can install GCC with the `build-essential <https://packages.ubuntu.com/jammy/build-essential>`__ package.

For building the documentation or the CUDA version, the following additional software is required:
For building the documentation, the additional library is required:

- `Sphinx <https://www.sphinx-doc.org/en/master/>`__

For building the CUDA backend verions (WIP), the following software is required:

- `CUDA Toolkit <https://developer.nvidia.com/cuda-toolkit>`__

.. note::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Tests

Simply building the library does not necessarily guarantee its correct functionality.
The best way to ensure that it works correctly is by running tests.
It's essential to set the option ``-D BUILD_TESTS=ON`` during configuration.
It's essential to set the option ``-D BUILD_TESTS=ON`` during configuration (it should be set by default if you followed the instructions in the `Compilation <compilation>`__ section).
This step is highly recommended during development to verify the library's functionality after each modification.

To run all the tests, you can use the following command in the build directory:
Expand Down

0 comments on commit 329f6d5

Please sign in to comment.