[CMake] CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Robert Maynard robert.maynard at kitware.com
Sat Jul 29 16:54:50 EDT 2017


The way to control which CUDA version to use is by setting the CUDACXX
environment variable, or by setting the CMAKE_CUDA_COMPILER cache
variable.

To specify which CUDA compilation language you want 98/11/14 you can
use any of methods that are possible by compile features (
https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html
). That means you can do:

- set(CMAKE_CUDA_STANDARD 11)
- set_property(TARGET <tgt> PROPERTY CUDA_STANDARD 11)

or if you have C++ enabled at the project level
- target_compile_features(<tgt> PUBLIC cxx_std_11)




On Sat, Jul 29, 2017 at 2:44 AM, Brian J. Davis <bitminer at gmail.com> wrote:
>
> Saying I could get this to work, which it is not how, would one using
> project:
>
> Project( myproject CXX CUDA)
>
> specify the version of CUDA to use if I have CUDA 7.5 and 8 installed
> simultaneously.  FindCUDA could do it.  And say if version of cuda could be
> specified why not c++ 0x or 11... Ya know cuz if we are going to be able to
> specify the version of one "first class" language we should be able to
> specify the version of each.... yeah I am guessing I know the answer to this
> already.  I just had this burning desire to ask this question.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list