Skip to content

Commit

Permalink
Addresses CMake 3.20 regression in parsing '--parallel' ('-j') option
Browse files Browse the repository at this point in the history
  • Loading branch information
themarpe committed Apr 1, 2021
1 parent 37f7089 commit dee72d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Configure project
run: cmake -S . -B build -DDEPTHAI_PYTHON_FORCE_DOCSTRINGS=ON -DDEPTHAI_PYTHON_DOCSTRINGS_OUTPUT="$PWD/docstrings/depthai_python_docstring.hpp"
- name: Build target 'pybind11_mkdoc'
run: cmake --build build --parallel --target pybind11_mkdoc
run: cmake --build build --target pybind11_mkdoc --parallel
- name: Upload docstring artifacts
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
- name: Build and install depthai-core
run: |
cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --parallel --target install
cmake --build build_core --target install --parallel
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV
- name: Append build hash if not a tagged commit
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
- name: Build and install depthai-core
run: |
cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --parallel --target install
cmake --build build_core --target install --parallel
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV
- name: Append build hash if not a tagged commit
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Documentation is available over at [Luxonis DepthAI API](https://docs.luxonis.co
python3 -m pip install -U pip
python3 -m pip install -r docs/requirements.txt
cmake -S . -B build -D DEPTHAI_BUILD_DOCS=ON -D DEPTHAI_PYTHON_BUILD_DOCS=ON
cmake --build build --parallel --target sphinx
cmake --build build --target sphinx --parallel
python3 -m http.server --bind 0.0.0.0 8000 --directory build/docs/sphinx
```
Expand All @@ -44,7 +44,7 @@ Documentation is available over at [Luxonis DepthAI API](https://docs.luxonis.co
in a new terminal window to update the website source
```
cmake --build build --parallel --target sphinx
cmake --build build --target sphinx --parallel
```
Then refresh your page - it should load the updated website that was just built
Expand Down Expand Up @@ -74,15 +74,22 @@ See: [depthai-core dependencies](https://github.com/luxonis/depthai-core#depende
To build a shared library from source perform the following:
```
mkdir build && cd build
cmake ..
cmake .. [-D PYTHON_EXECUTABLE=/full/path/to/python]
cmake --build . --parallel
```
Where `-D PYTHON_EXECUTABLE` option can optionally specify an exact Python executable to use for building.
To build a wheel, execute the following
```
python3 -m pip wheel . -w wheelhouse
```
To build and install using pip:
```
python3 -m pip install .
```
## Running tests
To run the tests build the library with the following options
Expand Down
2 changes: 1 addition & 1 deletion depthai-core
2 changes: 1 addition & 1 deletion docs/docker/update_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

cmake --build build --parallel --target sphinx
cmake --build build --target sphinx --parallel

# fix missing index.css file
cp /app/docs/source/_static/css/* /app/build/docs/sphinx/_static/css

0 comments on commit dee72d3

Please sign in to comment.