title: How to reinstall OpenCV with different configurations?
body: <p>I have compiled <a href="http://opencv.org" rel="nofollow">OpenCV</a> with a couple of flags with <a href="https://cmake.org" rel="nofollow">CMake</a> and then installed it with make. More precisely, I did:</p>
  
  <pre><code>$ cd ~
  $ git clone https://github.com/Itseez/opencv.git
  $ cd opencv
  $ git checkout 3.0.0
  
  $ cd ~/opencv
  $ mkdir build
  $ cd build
  $ cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D INSTALL_C_EXAMPLES=ON \
      -D INSTALL_PYTHON_EXAMPLES=ON \
      -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
      -D BUILD_EXAMPLES=ON ..
  $ make -j4
  $ sudo make install
  
  $ sudo ldconfig
  </code></pre>
  
  <p>Now I would like to compile <a href="http://opencv.org" rel="nofollow">OpenCV</a> with a different configuration. I would add the <code>WITH_OPENMP = ON</code> flag, so it would look like this instead:</p>
  
  <pre><code>$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_INSTALL_PREFIX=/usr/local \
      -D INSTALL_C_EXAMPLES=ON \
      -D WITH_OPENMP=ON \
      -D INSTALL_PYTHON_EXAMPLES=ON \
      -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
      -D BUILD_EXAMPLES=ON ..
  </code></pre>
  
  <p>What would I need to do to successfully reinstall <a href="http://opencv.org" rel="nofollow">OpenCV</a> with <a href="http://openmp.org" rel="nofollow">OpenMP</a>? Do I have to do the same exact steps (excluding the git part), meaning that <code>sudo make install</code> would override the previous <a href="http://opencv.org" rel="nofollow">OpenCV</a> installation? Or do I need to uninstall and remove files, etc?</p>
  
  <p>Thank you for the help!!</p>