title: compile opencv with cuda for MAC
body: <p>I am trying to compile opencv 2.4.5 with CUDA support in Mac OS X. I am using the cmake gui 2.8.10 with Qt 4.8</p>
  <p>After a</p>
  <pre><code>clang: error: unsupported option '-dumpspecs' 
  </code></pre>
  <p>in the make i have set the entry CUDA_HOST_COMPILER to /usr/bin/llvm-g++ . But now I receive this error:</p>
  <pre><code>[ 16%] Built target IlmImf
  [ 16%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
  cc1plus: warning: command line option &quot;-Wmissing-declarations&quot; is valid for C/ObjC but not for C++
  cc1plus: warning: command line option &quot;-Wstrict-prototypes&quot; is valid for Ada/C/ObjC but not for C++
  cc1plus: error: unrecognized command line option &quot;-Wno-narrowing&quot;
  cc1plus: error: unrecognized command line option &quot;-Wno-delete-non-virtual-dtor&quot;
  cc1plus: error: unrecognized command line option &quot;-Wno-unnamed-type-template-args&quot;
  </code></pre>
  <p>What can i do now?</p>
  <h3>SYSTEM SETTINGS</h3>
  <pre><code>OS X 10.8.3 (12D78)
  </code></pre>
  <p>and</p>
  <pre><code>&gt;&gt;&gt; clang --version
  Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
  Target: x86_64-apple-darwin12.3.0
  Thread model: posix
  </code></pre>
  <p>and</p>
  <pre><code>&gt;&gt;&gt; g++ --version
  i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
  &gt;&gt;&gt; ls -al /usr/bin/g++
  /usr/bin/g++ -&gt; llvm-g++-4.2
  </code></pre>
  <p>and</p>
  <pre><code>&gt;&gt;&gt; cc --version
  Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
  Target: x86_64-apple-darwin12.3.0
  Thread model: posix
  &gt;&gt;&gt; ls -al /usr/bin/cc
  /usr/bin/cc -&gt; clang
  </code></pre>