<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; Latest master branch (following latest commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/opencv/opencv/commit/92c0709c494d86d94894e443acef00ac41f5967c/hovercard" href="https://github.com/opencv/opencv/commit/92c0709c494d86d94894e443acef00ac41f5967c"><tt>92c0709</tt></a>)</li>
<li>Operating System / Platform =&gt; Debian Linux BeagleBone Black 4.4.9-ti-r25</li>
<li>Compiler =&gt; GCC Version 4.9.2 (Debian 4.9.2-10)</li>
<li>CMake =&gt; v3.5.2</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">CMake Build Error - Directory names used in OpenCVUtils regular expressions containing non-alphanumeric characters such as '+' in <code class="notranslate">../c++/</code> cause cmake to fail. Renaming the parent directory from "C++" to "Cxx" allows cmake to proceed. Note though that in the cmake output below, the directory <code class="notranslate">/usr/bin/c++</code> is also used.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- The CXX compiler identification is GNU 4.9.2
-- The C compiler identification is GNU 4.9.2
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected version of GNU GCC: 49 (409)
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at cmake/OpenCVUtils.cmake:120 (if):
  if given arguments:

    &quot;/home/debian/Desktop/Sandbox/C++/opencv/Build&quot; &quot;MATCHES&quot; &quot;^/home/debian/Desktop/Sandbox/C++/opencv&quot; &quot;OR&quot; &quot;/home/debian/Desktop/Sandbox/C++/opencv/Build&quot; &quot;MATCHES&quot; &quot;^/home/debian/Desktop/Sandbox/C++/opencv/Build&quot; &quot;OR&quot; &quot;(&quot; &quot;OPENCV_EXTRA_MODULES_PATH&quot; &quot;AND&quot; &quot;/home/debian/Desktop/Sandbox/C++/opencv/Build&quot; &quot;MATCHES&quot; &quot;^&quot; &quot;)&quot;

  Regular expression &quot;^/home/debian/Desktop/Sandbox/C++/opencv&quot; cannot
  compile
Call Stack (most recent call first):
  cmake/OpenCVUtils.cmake:135 (ocv_is_opencv_directory)
  CMakeLists.txt:488 (ocv_include_directories)


-- Configuring incomplete, errors occurred!"><pre class="notranslate"><code class="notranslate">-- The CXX compiler identification is GNU 4.9.2
-- The C compiler identification is GNU 4.9.2
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected version of GNU GCC: 49 (409)
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at cmake/OpenCVUtils.cmake:120 (if):
  if given arguments:

    "/home/debian/Desktop/Sandbox/C++/opencv/Build" "MATCHES" "^/home/debian/Desktop/Sandbox/C++/opencv" "OR" "/home/debian/Desktop/Sandbox/C++/opencv/Build" "MATCHES" "^/home/debian/Desktop/Sandbox/C++/opencv/Build" "OR" "(" "OPENCV_EXTRA_MODULES_PATH" "AND" "/home/debian/Desktop/Sandbox/C++/opencv/Build" "MATCHES" "^" ")"

  Regular expression "^/home/debian/Desktop/Sandbox/C++/opencv" cannot
  compile
Call Stack (most recent call first):
  cmake/OpenCVUtils.cmake:135 (ocv_is_opencv_directory)
  CMakeLists.txt:488 (ocv_include_directories)


-- Configuring incomplete, errors occurred!
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cd ~; mkdir C++ &amp;&amp; cd C++
git clone &lt;opencv repo&gt; opencv; cd opencv
mkdir Build &amp;&amp; cd Build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=OFF -D WITH_CUFFT=OFF -D WITH_CUBLAS=OFF -D WITH_NVCUVID=OFF -D WITH_OPENCL=OFF -D WITH_OPENCLAMDFFT=OFF -D WITH_OPENCLAMDBLAS=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D ENABLE_NEON=on .."><pre class="notranslate"><code class="notranslate">cd ~; mkdir C++ &amp;&amp; cd C++
git clone &lt;opencv repo&gt; opencv; cd opencv
mkdir Build &amp;&amp; cd Build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=OFF -D WITH_CUFFT=OFF -D WITH_CUBLAS=OFF -D WITH_NVCUVID=OFF -D WITH_OPENCL=OFF -D WITH_OPENCLAMDFFT=OFF -D WITH_OPENCLAMDBLAS=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D ENABLE_NEON=on ..
</code></pre></div>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Operating System / Platform =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Compiler =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
</ul>
<h5 dir="auto">Detailed description</h5>

<h5 dir="auto">Steps to reproduce</h5>