host_C_compiler&gt;</div><div class="line">CXX=&lt;path_to_host_C++_compiler&gt;</div></div><!-- fragment --><p>To force a different host compiler to compile host side <code>nvcc</code> code (<code>*.cu</code>) substitute <code>cmake ..</code> with </p><div class="fragment"><div class="line">cmake -DCUDAHC=&lt;path_to_host_C++_compiler&gt;</div></div><!-- fragment --><p> Note: host compiler and host side <code>nvcc</code> compiler may be different. The host side <code>nvcc</code> compiler must be compatible