Skip to content
Snippets Groups Projects
Verified Commit 15a7acce authored by Timm Fitschen's avatar Timm Fitschen
Browse files

DOC: update README_SETUP for installation

parent f1148d43
No related branches found
No related tags found
No related merge requests found
Pipeline #9608 passed
Pipeline: caosdb-cppinttest

#9609

    ...@@ -127,7 +127,6 @@ trigger_inttest: ...@@ -127,7 +127,6 @@ trigger_inttest:
    script: script:
    - mkdir -p build - mkdir -p build
    - cd build - cd build
    - conan install ..
    - cmake .. - cmake ..
    - cmake --build . --target doc-sphinx - cmake --build . --target doc-sphinx
    - cp -r doc/sphinx_out ../public - cp -r doc/sphinx_out ../public
    ...@@ -139,7 +138,7 @@ pages: ...@@ -139,7 +138,7 @@ pages:
    <<: *pages_prepare <<: *pages_prepare
    only: only:
    refs: refs:
    - /^release-.*$/i - main
    artifacts: artifacts:
    paths: paths:
    - public - public
    ...@@ -41,23 +41,28 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) ...@@ -41,23 +41,28 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
    set(PROJECT_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include") set(PROJECT_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include")
    find_program(iwyu NAMES include-what-you-use iwyu PATHS ${CMAKE_SOURCE_DIR}/tools/include-what-you-use/${iwyu_os}/bin) option(LINTING ON)
    if(NOT iwyu) if(LINTING)
    message(STATUS "include-what-you-use: Not found") find_program(iwyu NAMES include-what-you-use iwyu PATHS ${CMAKE_SOURCE_DIR}/tools/include-what-you-use/${iwyu_os}/bin)
    if(NOT iwyu)
    message(STATUS "include-what-you-use: Not found")
    else()
    message(STATUS "include-what-you-use: ${iwyu}")
    set(_CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${iwyu})
    endif()
    find_program(clang_tidy NAMES clang-tidy clang-tidy-11)
    if(NOT clang_tidy)
    message(STATUS "clang-tidy: Not found")
    else()
    message(STATUS "clang-tidy: ${clang_tidy}")
    set(_CMAKE_CXX_CLANG_TIDY "${clang_tidy}"
    "--header-filter=caosdb/.*[^\(\.pb\.h\)]$"
    "--checks=*,-fuchsia-*,-llvm-include-order,-llvmlibc-*"
    "--warnings-as-errors=*")
    endif()
    else() else()
    message(STATUS "include-what-you-use: ${iwyu}") message(STATUS "LINTING is OFF")
    set(_CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${iwyu})
    endif()
    find_program(clang_tidy NAMES clang-tidy clang-tidy-11)
    if(NOT clang_tidy)
    message(STATUS "clang-tidy: Not found")
    else()
    message(STATUS "clang-tidy: ${clang_tidy}")
    set(_CMAKE_CXX_CLANG_TIDY "${clang_tidy}"
    "--header-filter=caosdb/.*[^\(\.pb\.h\)]$"
    "--checks=*,-fuchsia-*,-llvm-include-order,-llvmlibc-*"
    "--warnings-as-errors=*")
    endif() endif()
    add_subdirectory(src) add_subdirectory(src)
    ......
    ...@@ -4,10 +4,35 @@ ...@@ -4,10 +4,35 @@
    We use [cmake](https://cmake.org) as build tool. We use [cmake](https://cmake.org) as build tool.
    1. `cmake -B build` 1. `mkdir build && cd build/`
    2. `cd build` 2. `cmake -B . ..`
    3. `cmake --build .` 3. `cmake --build .`
    ### Troubleshooting
    #### protobufConfig.cmake not found
    If you encounter something like `protobufConfig.cmake` when doing `cmake ..` your system doesn't have the gRPC library installed at all or your installation doesn't have the required `protobufConfig.cmake` file. One approach is to fetch and build gRPC and ProtoBuf with cmake locally:
    1. Go to the build directory if you are not there
    2. `cmake -B . -D LINTING=OFF -D GRPC_FETCHCONTENT=ON ..`
    ```
    -- include-what-you-use: /usr/lib/llvm/11/bin/include-what-you-use
    -- clang-tidy: /usr/lib/llvm/11/bin/clang-tidy
    -- Using gRPC via add_subdirectory (FetchContent).
    ... (A LOT OF STUFF)
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/tf/src/caosdb/caosdb-cpplib/build
    ```
    Note: We turn linting off because we don't want to lint the third-party projects.
    3. Because we don't want to download and build everything again each time we
    wipe our build directory: `cmake --install . --prefix $HOME/.local/`
    ## Unit Tests ## Unit Tests
    ### Run ### Run
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment