<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-text-html" lang="x-unicode">
      <blockquote type="cite"><br>
        <pre>My responses are inline.</pre>
      </blockquote>
      As are mine.<br>
      <blockquote type="cite">
        <pre>On Sat, Jul 29, 2017 at 7:00 PM, Brian J. Davis <<a href="http://public.kitware.com/mailman/listinfo/cmake">bitminer at gmail.com</a>> wrote:
><i> @Robert
</i>><i>
</i>><i> I created a fresh simple cmake project in 3.9.  This appeared to find CUDA
</i>><i> 8.0 successfully so it may have something do with my other project settings
</i>><i> that I am trying to get to work with 3.9, VS13, CUDA 7.5/8.0.
</i>><i>
</i>><i> Using:
</i>><i>
</i>><i> message( CUDACXX = ${CUDACXX})
</i>><i> message( CMAKE_CUDA_COMPILER = ${CMAKE_CUDA_COMPILER})
</i>><i>
</i>><i>
</i>><i> Reports
</i>><i>
</i>><i> CUDACXX=
</i>><i> CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
</i>><i> Toolkit/CUDA/v8.0/bin/nvcc.exe
</i>><i> Configuring done
</i>><i> Generating done
</i>><i>
</i>><i> The question was at setting the CUDA version say 7.5 or 8.0.
</i>><i>
</i>><i> I search doc for CUDACXX and CMAKE_CUDA_COMPILER with no hits.  Is this
</i>><i> stuff documented anywhere.
</i>
Unfortunately the environment variables are not documented anywhere
and this is a known issue
that I hope to have fixed in CMake 3.10.

The CMAKE_CUDA_COMPILER falls under the the CMAKE_<LANG>_COMPILER documentation
now with the new CUDA support (
<a href="https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_COMPILER.html">https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_COMPILER.html</a> ).

</pre>
      </blockquote>
      <br>
      So let me get this straight.  Changes appear to begin in 3.7 / 3.8
      with VS started to be supported in 3.9, but the only way us
      schleps on the internet know how to use it is to wait until 3.10. 
      Wow... seriously.  And well I am not holding out *hope*.<br>
      <br>
      <blockquote type="cite">
        <pre>><i>
</i>><i> Do I really need to say set:
</i>><i>
</i>><i> CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
</i>><i> Toolkit/CUDA/v7.5/bin/nvcc.exe
</i>><i>
</i>><i> To get CMake to compile for 7.5?  I mean:
</i>><i>
</i>><i> find_package(CUDA 7.5)
</i>><i>
</i>><i> you could agree is/was much simpler.  I am becoming frustrated and confused
</i>><i> by these changes.
</i>
It might be possible in the future to provide other hint controls to
tell CMake which
version of CUDA you would like to use before the project /
enable_language call. This
would be something that is best addressed on the cmake developer list or as
a gitlab issue ( <a href="https://gitlab.kitware.com/cmake/cmake/issues">https://gitlab.kitware.com/cmake/cmake/issues</a> )
</pre>
      </blockquote>
      In the future with the robots... anything is possible... provided
      they are not out to kill us.<br>
      <br>
      Why would I bother to seemingly point out the obvious @developers
      list or issue tracker.  Hopefully anyone reading this can tell I
      am a bit frustrated at this point.  Huh here's how that would go:<br>
      <br>
      Me: Hey Devs you forgot to document how to use the tool.  Do you
      expect anyone but you to know how to use it?<br>
      <br>
      Devs: Huh yea we know...  Ugh ... errr... Huhhh were getting to
      that. <br>
      <br>
      Me: sigh...<br>
      <blockquote type="cite">
        <pre>><i>
</i>><i> I can't even get a simple CUDA app to run using FindCUDA (will compile) or
</i>><i> compile using v3.9 and new project( CXX CUDA).
</i>><i>
</i>><i> Your example at:
</i>><i>
</i>><i> <a href="https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html">https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html</a>
</i>><i>
</i>><i>
</i>><i> Used:
</i>><i>
</i>><i> add_executable(CudaConsumeCompileFeatures main.cu)
</i>><i>
</i>><i> Is is required now that main.cpp be a .cu file now?  I wouldn't think so,
</i>><i> but I am so lost in the woods on this that I am not sure of anything
</i>><i> anymore.
</i>
So with the new CUDA support you can mix C/C++/CUDA sources together
inside a single library or executable. This example was only using CUDA
in the executable to reduce the complexity of the test.

</pre>
      </blockquote>
      Only if I can get it to work.  Which I can't ... and would not
      know how anyway as well it is not documented... so why waste my
      time.
      <blockquote type="cite">
        <pre>><i>
</i>><i> How do I get all the toolkit and sdk include and lib dir variables now as
</i>><i> FindCUDA provided?
</i>
The toolkit include directory can be found by querying
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
As far as CUDA SDK libraries those can simply used with target_link_libraries
as the SDK library path is considered to be an implicit link directory, and will
always be on the link line. This is actually the same for the CUDA sdk include
directory ( it will be placed on the include line when building ).

><i>
</i>><i> I am so curfuffled by these changes.
</i>
These changes are needed to allow targets using CUDA to properly work with
'Modern' CMake (<a href="https://cmake.org/cmake/help/v3.8/manual/cmake-buildsystem.7.html#build-specification-and-usage-requirements">https://cmake.org/cmake/help/v3.8/manual/cmake-buildsystem.7.html#build-specification-and-usage-requirements</a>).
Without these changes usage requirements and CUDA would never work together.
</pre>
        <br>
      </blockquote>
      I assume the term *work* is used loosely.... VERY loosely.  I hate
      to point out the obvious, but I can't get it to work now and have
      not clue or seemingly hope on figuring it out other than to check
      out CMake and roll my own version after reading impl in order to
      figure out how it does and how to get it to work.  By that time
      I'd rather revert to writing VS xml project file by hand.<br>
      <br>
      Regarding 960M and CUDA  7.5/7.5, 8.0/7.5, and 7.7/9.0<br>
      <br>
      Answer is:<br>
      <br>
      960M was likely released post CUDA  7.5 driver and possibly post
      8.0.  Seems that architecture differences do not allow old drivers
      to work on newer arch cards.   Once 9.0 driver was released... 7.5
      run time worked with 9.0 driver, but for some reason not 8.0. 
      Seems CUDA and Nvidia Runtime/Drivers have a dirty little secret
      much like Java and the runtimes.<br>
      <br>
      At this point I cannot get CMake 3.2 or 3.9 to work with CUDA
      7.5/9.0, VS 13, on Win10Pro/Enterprise.  And from the state of doc
      it seems not worth my effort to even try anymore.<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
    </div>
  </body>
</html>