diff --git a/docs/source/compilation.rst b/docs/source/compilation.rst index 54aa2ccc..237deaa5 100644 --- a/docs/source/compilation.rst +++ b/docs/source/compilation.rst @@ -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. @@ -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 `__ section. +- Install VScode from `here `__ 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 `__ + + Configuration options ~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/functions.rst b/docs/source/functions.rst index 5e74710f..dd261b21 100644 --- a/docs/source/functions.rst +++ b/docs/source/functions.rst @@ -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 `__. diff --git a/docs/source/requirements.rst b/docs/source/requirements.rst index 84b83587..4514c52e 100644 --- a/docs/source/requirements.rst +++ b/docs/source/requirements.rst @@ -12,9 +12,12 @@ To compile the library, you'll need the following software: - On macOS, you can install the `Xcode command line tools `__ - On Linux, you can install GCC with the `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 `__ + +For building the CUDA backend verions (WIP), the following software is required: + - `CUDA Toolkit `__ .. note:: diff --git a/docs/source/tests.rst b/docs/source/tests.rst index 9e635e76..ded61c78 100644 --- a/docs/source/tests.rst +++ b/docs/source/tests.rst @@ -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 `__ 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: