<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi there,<span style=" color:#000000;"><br>
      <br>
      I have problems with CMake and Cuda under Windows 7.<br>
      <br>
      Here is my CMakeLists.txt:<br>
      <br>
    </span>...<br>
    <span style=" color:#008000;">###</span><span style="
      color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span
      style=" color:#c0c0c0;"> </span><span style=" color:#008000;">cuda</span><span
      style=" color:#c0c0c0;"> </span><span style=" color:#008000;">files</span>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">SET</span>(CUDA_SRCS<span style=" color:#c0c0c0;"> </span>source/kernel.cu)</pre>
    <br>
    <span style=" color:#008000;"></span>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">###</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">find</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">cuda</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">FIND_PACKAGE</span>(CUDA 4.0)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">SET</span>(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE<span style=" color:#c0c0c0;"> </span>OFF)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">SET</span>(CUDA_64_BIT_DEVICE_CODE<span style=" color:#c0c0c0;"> </span>ON)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">SET</span>(CUDA_NVCC_FLAGS<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"-arch;sm_13"</span>)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">SET</span>(CUDA_VERBOSE_BUILD<span style=" color:#c0c0c0;"> </span>ON)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">CUDA_COMPILE</span>(CUDA_FILES<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${CUDA_SRCS}</span><span style=" color:#c0c0c0;"> </span>OPTIONS<span style=" color:#c0c0c0;"> </span>-ccbin<span style=" color:#c0c0c0;"> </span><small><span style=" color:#c0c0c0;"></span><span style=" color:#008000;">"C:/Program</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">Files</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">(x86)/Microsoft</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">Visual</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">Studio</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">9.0/VC/bin/cl.exe"</span></small>)</pre>
    <span style=" color:#808000;"><br>
      <small>CUDA_INCLUDE_DIRECTORIES</small></span><small>(<span
        style=" color:#800000;">${CMAKE_CURRENT_SOURCE_DIR}</span>
    </small>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><small><span style=" color:#c0c0c0;">                       <big>  </big></span><big><span style=" color:#800000;">    ${CMAKE_CURRENT_SOURCE_DIR}</span>/source)</big></small></pre>
    <small>
    </small>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">INCLUDE_DIRECTORIES</span>(<span style=" color:#800000;">${CUDA_INCLUDE_DIRS}</span><span style=" color:#c0c0c0;"></span>)</pre>
    <pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
    ...<br>
    <br>
    <small><span style=" color:#808000;">QT4_WRAP_UI</span>( GUI_HDRS<span
        style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${GUI_SRCS}</span>)</small>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">QT4_WRAP_CPP</span>( MOC_SRCS<span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${MOC_HDRS}</span>)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">ADD_EXECUTABLE</span>( Project<span style=" color:#800000;"> ${H}</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${SRCS}</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${GUI_HDRS}</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${MOC_SRCS}</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${CUDA_FILES}</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${CUDA_SRCS}</span>)</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">###</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">link</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">libraries</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">TARGET_LINK_LIBRARIES</span>(Project <span style=" color:#800000;">${QT_LIBRARIES}</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">${CUDA_LIBRARIES}</span><span style=" color:#c0c0c0;"> </span>)</pre>
    <br>
    The build files are generated, but :<br>
    <br>
    <small><span style=" color:#000000;">Linking CXX executable
        Viewer.exe</span>
    </small>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
        style=" color:#aa0000;"><small>CMakeFiles\Viewer.dir/objects.a:
          member
          CMakeFiles\Viewer.dir/objects.a(cuda_compile_generated_kernel.cu.obj)
          in archive is not an object</small><br>
      </span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
        style=" color:#aa0000;"><br>
        <font color="#000000"><br>
          What is wrong with the cmake configuration?<br>
          I look forward to answers.<br>
        </font></span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
        style=" color:#aa0000;"><font color="#000000"><br>
          Best regards<br>
          N.Schubert<br>
          <br>
        </font></span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
      <span style=" color:#aa0000;"></span></p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
        style=" color:#aa0000;"><font color="#000000"><br>
        </font></span></p>
  </body>
</html>