<p>In <a href="https://github.com/mlpack/mlpack/pull/700#discussion_r69314164">CMakeLists.txt</a>:</p>
<pre style='color:#555'>&gt; +# This way we can skip calls to functions defined in omp.h with code like:
&gt; +# if(HAS_OPENMP) {omp related stuff}
&gt; +if (HAS_OPENMP)
&gt; +  add_definitions(-DHAS_OPENMP)
&gt; +  find_package(OpenMP)
&gt; +  if (OPENMP_FOUND)
&gt; +    set(HAS_OPENMP &quot;1&quot;)
&gt; +    set(CMAKE_C_FLAGS &quot;${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}&quot;)
&gt; +    set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}&quot;)
&gt; +  else ()
&gt; +    set(HAS_OPENMP &quot;0&quot;)
&gt; +    set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas&quot;)
&gt; +  endif ()
&gt; +else ()
&gt; +    set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas&quot;)
&gt; +endif()
</pre>
<p>Hm, so, with what you have changed here, a user must specify <code>HAS_OPENMP</code> for OpenMP to be used.  With the previous code, CMake would determine whether or not OpenMP support was available, and if so, OpenMP would be enabled.  I think maybe it is better to use automatic detection here instead of asking the user to specify <code>-D HAS_OPENMP</code>; what do you think?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/700/files/3af80c339a7a846bb3bdf305131c87eaa939fc01#r69314164">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFCUOQLCEGRoRvnL4J6mNleb-L30aks5qRS5XgaJpZM4I5KSz">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAH8BA5100xe9pYK-GYqDW-eTVLpks5qRS5XgaJpZM4I5KSz.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/700/files/3af80c339a7a846bb3bdf305131c87eaa939fc01#r69314164"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>