Best/efficient development workflow?
I've recently started open-source, contributing to OpenCV. I searched through the questions, never really found a good exhaustive development workflow. (Might be a rookie search)
My current workflow:
- Sync up everything with upstream, create a new branch.
- Run cmake-gui, configure and generate. [BUILD_opencv_world checked]
- Install OpenCV globally (via
sudo make install -j12
) <- This takes a huge, huge amount of time. - Make changes in files. (actual contribution)
- Repeat 3)
- Create a directory in a separate location, use CMakeLists.txt to find OpenCV package, bind libs to arbitrary
test.cpp
- Compile, check if changes were correct. Repeat 4) and 5) until the changes make sense.
- Push and create a PR.
The step 3) is very time consuming, if I were to shift from master to 3.4 or vice versa, or if I were to quickly check out another working branch. Is there any workaround to this? (Might be a rookie overview of the problem, any help would be much appreciated!)
This is not recommended to install globally. Instead, use
CMAKE_INSTALL_PREFIX
to point to something likeopencv-build/install
and useOpenCV_DIR
environment variable to let CMake find OpenCV.This is a good point, I'll make sure of this from next time.