Skip to content
Snippets Groups Projects
Commit b7d2dc5e authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

DOC: Update build instructions for Conan 2.0

parent 8b399d78
No related branches found
No related tags found
2 merge requests!61Release 0.3.0,!49Resolve "EXTERN: Adapt to Conan 2"
...@@ -4,7 +4,7 @@ How to use and develop libcaosdb ...@@ -4,7 +4,7 @@ How to use and develop libcaosdb
Dependencies Dependencies
------------ ------------
- See the `dependencies <DEPENDENCIES.md>`__ file, install with ``pip install -r requiremens.txt``. - See the `dependencies <DEPENDENCIES.md>`__ file, install with ``pip install -r requirements.txt``.
Build Build
----- -----
...@@ -26,9 +26,9 @@ We use `cmake <https://cmake.org>`__ as build tool, with Conan as ...@@ -26,9 +26,9 @@ We use `cmake <https://cmake.org>`__ as build tool, with Conan as
package manager. The compiler must support the C++17 standard. package manager. The compiler must support the C++17 standard.
1. clone/update the subrepo ``git submodule update --init proto`` 1. clone/update the subrepo ``git submodule update --init proto``
2. ``mkdir build && cd build`` 2. ``conan install . -s build_type=Release --build=missing``
3. ``conan install .. -s "compiler.libcxx=libstdc++11"`` 3. ``cd build/Release``
4. ``cmake -B . ..`` 4. ``cmake .``
5. ``cmake --build .`` 5. ``cmake --build .``
You may also want to install libcaosdb system-wide to You may also want to install libcaosdb system-wide to
...@@ -38,7 +38,7 @@ You may also want to install libcaosdb system-wide to ...@@ -38,7 +38,7 @@ You may also want to install libcaosdb system-wide to
The default install prefix is ``~/.local``. It can be set by adding The default install prefix is ``~/.local``. It can be set by adding
``-DCMAKE_INSTALL_PREFIX=/path/to/install/prefix`` to the first cmake ``-DCMAKE_INSTALL_PREFIX=/path/to/install/prefix`` to the first cmake
command (3.). command (4.).
.. Note:: .. Note::
...@@ -54,15 +54,7 @@ to merge requests which support multiple ways of installation. ...@@ -54,15 +54,7 @@ to merge requests which support multiple ways of installation.
How to build on MacOS How to build on MacOS
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
If you use apple-clang as the compiler: Instead of the above conan ... is currently untested.
command (2.) use
1. ``conan install .. -s "compiler.cppstd=17"``
and continue as you would when building on a Linux system. You may have
to add ``build/lib/`` (or, alternatively after installation,
``CMAKE_INSTALL_PREFIX/lib``) to your ``DYLD_LIBRARY_PATH``
environmental variable.
Problems and solutions Problems and solutions
^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
...@@ -77,14 +69,13 @@ How to build on Windows ...@@ -77,14 +69,13 @@ How to build on Windows
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
We use `Visual Studio We use `Visual Studio
2019 <https://visualstudio.microsoft.com/de/vs/features/cplusplus/>`__ 2022 <https://visualstudio.microsoft.com/de/vs/features/cplusplus/>`__
as compiler. We use `cmake <https://cmake.org/download/>`__ as build as compiler. We use `cmake <https://cmake.org/download/>`__ as build
tool. tool.
1. clone/update the subrepo ``git submodule update --init proto`` 1. clone/update the subrepo ``git submodule update --init proto``
2. ``mkdir build`` 2. ``conan install .. -g visual_studio -s arch=x86_64 -s build_type=Release -s compiler.toolset=v142 -s compiler.version=16 -s compiler.runtime=MD --build=missing --update``
3. ``cd build`` 3. ``cd build/Release``
4. ``conan install .. -g visual_studio -s arch=x86_64 -s build_type=Release -s compiler.toolset=v142 -s compiler.version=16 -s compiler.runtime=MD --build=missing --update``
5. ``cmake -B . ..`` 5. ``cmake -B . ..``
6. open ``libcaosdb.sln`` with Visual Studio, change the buildtype to 6. open ``libcaosdb.sln`` with Visual Studio, change the buildtype to
``Release`` and build the project. (You can open Tools/Command ``Release`` and build the project. (You can open Tools/Command
...@@ -103,6 +94,17 @@ Known problems ...@@ -103,6 +94,17 @@ Known problems
Troubleshooting Troubleshooting
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
ERROR: The default build profile '~/.conan2/profiles/default' doesn't exist
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Follow the instructions and run
.. code:: console
conan profile detect
Check the output and adjust settings if necessary.
Warning: WARNING: GCC OLD ABI COMPATIBILITY Warning: WARNING: GCC OLD ABI COMPATIBILITY
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -175,13 +177,11 @@ Unit tests ...@@ -175,13 +177,11 @@ Unit tests
Build Build
^^^^^ ^^^^^
For the tests there is a slightly different setup required (with option For the tests the build type has to be Debug. As a shorthand you can run ``make
``-D CMAKE_BUILD_TYPE=Debug``) test``. If you want to build manually, follow these steps:
1. ``mkdir build && cd build/`` 1. ``conan install . -s build_type=Debug``
2. ``conan install ..`` (with gcc, append 2. ``cd build/Debug``
``-s "compiler.libcxx=libstdc++11"``, with apple-clang, append
``-s compiler.cppstd=17``)
3. ``cmake -B . -D CMAKE_BUILD_TYPE=Debug ..`` 3. ``cmake -B . -D CMAKE_BUILD_TYPE=Debug ..``
- If your clang-format version is too old, formatting, linting etc. can - If your clang-format version is too old, formatting, linting etc. can
be skipped: be skipped:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment