1. 22 Mar, 2016 1 commit
    • Brad King's avatar
      FindCUDA: Fix regression in separate compilation (#16027) · 72a97b7a
      Brad King authored
      Since commit v3.5.0-rc1~47^2 (FindCUDA: Support special characters in
      path, 2016-01-15) our add_custom_command calls use VERBATIM so that
      CMake will automatically quote special characters correctly.  Fix the
      separate compilation code path to not add its own quoting when the
      VERBATIM option will be used.
      72a97b7a
  2. 17 Feb, 2016 1 commit
    • Brad King's avatar
      FindCUDA: Fix regression under Visual Studio generators · 1911cda0
      Brad King authored
      Since commit v3.5.0-rc1~47^2 (FindCUDA: Support special characters in
      path, 2016-01-15) our add_custom_command calls use VERBATIM so that
      CMake will automatically quote special characters correctly.  However,
      this breaks the special `$(VCInstallDir)` placeholder used with Visual
      Studio generators.  Since we do not support preservation of such
      placeholders with VERBATIM (see issue #15001) we must fall back to not
      using VERBATIM when the placeholder is used.
      
      A better fix would be to stop using `$(VCInstallDir)` and use the value
      of `CMAKE_${CUDA_C_OR_CXX}_COMPILER` instead, but that will require
      additional semantic and documentation changes.  For now simply fix the
      regression with the above approach.
      Reported-by: default avatarStephen Sorley <Stephen.Sorley@jhuapl.edu>
      1911cda0
  3. 15 Jan, 2016 1 commit
  4. 23 Nov, 2015 1 commit
  5. 03 Nov, 2015 1 commit
    • Rolf Eike Beer's avatar
      FindCUDA: drop CUDA_dl_LIBRARY · b1efb023
      Rolf Eike Beer authored
      There is the global CMAKE_DL_LIBS setting which can be used instead. There are
      even platforms where this is either empty because those functions are part of
      the libc or is called entirely different, so this code wouldn't work reliable
      anyway.
      b1efb023
  6. 20 Aug, 2015 1 commit
  7. 15 Jun, 2015 1 commit
  8. 20 Apr, 2015 1 commit
  9. 09 Apr, 2015 2 commits
    • James Bigler's avatar
      FindCUDA: Add specific cuda_language_flag instead of using nvcc. · 1b0c77a3
      James Bigler authored
      I was previously appending to nvcc_flags inside the file loop.  This
      caused the flag to be appended multiple times which freaks out nvcc.
      Now the flag is specifically handled per file.
      1b0c77a3
    • James Bigler's avatar
      FindCUDA: Allow setting CUDA_SOURCE_PROPERTY_FORMAT for non-.cu files. · 8313de2d
      James Bigler authored
      A previously undocumented feature allowed overriding the format
      specified to CUDA_WRAP_SRCS with a source file property called
      CUDA_SOURCE_PROPERTY_FORMAT.  I added documentation for this feature as
      well as added the ability to let nvcc compile any file regardless of
      type if this property was found.
      
      In addition, I also fixed a couple of bugs with the calls to
      _cuda_get_important_host_flags that weren't garding the arguments with
      "" to prevent empty values from causing errors.
      8313de2d
  10. 08 Apr, 2015 1 commit
    • James Bigler's avatar
      FindCUDA: Handle c++11 host flag · 99abebde
      James Bigler authored
      If the host flags contain a c++11 flag (at least for gcc), then we can't
      automatically propagate to nvcc it using -Xcompiler.  This is because
      nvcc can't use any C++ only flags.  Instead we find this flag and add it
      to nvcc's flags (it has a special flag for dealing with c++11 code) and
      remove it from the host flags.
      
      Co-Author: Guillermo Marcus <gmarcus@nvidia.com>
      99abebde
  11. 03 Apr, 2015 1 commit
    • James Bigler's avatar
      FindCUDA: Use the static CUDA runtime library if available (#15482) · 7fea2b77
      James Bigler authored
      Beginning in CUDA 5.5 a static version of the cuda runtime library
      became available.  Since nvcc defaults to using this library over the
      shared version, FindCUDA will also default to using this version.  There
      are many advantages to using the static version (most importantly to
      avoid conflicts with multiple versions when building a CUDA based
      library).  Offer a CUDA_USE_STATIC_CUDA_RUNTIME option to control
      this behavior.
      7fea2b77
  12. 22 Jan, 2015 1 commit
  13. 21 Jan, 2015 1 commit
  14. 08 Jan, 2015 1 commit
  15. 06 Jan, 2015 1 commit
  16. 06 Nov, 2014 1 commit
  17. 22 Oct, 2014 1 commit
  18. 24 Sep, 2014 1 commit
  19. 30 Jun, 2014 1 commit
    • Adam Strzelecki's avatar
      FindCUDA: Fix OSX Clang & no C language enabled · 32bcec5f
      Adam Strzelecki authored
      When setting default CUDA_HOST_COMPILER we must dereference CMAKE_C_COMPILER,
      i.e. /usr/bin/clang should be used instead /usr/bin/cc which is symlink.
      Otherwise CUDA thinks it is GCC and issues -dumpspecs which is unknown option
      to Clang.
      
      Also in case neither CMAKE_C_COMPILER is defined (project does not use C
      language) nor CUDA_HOST_COMPILER is specified manually we should skip -ccbin
      and let nvcc use its own default C compiler.
      32bcec5f
  20. 19 May, 2014 2 commits
    • Daniele E. Domenichelli's avatar
      Do not change minimum required version in modules · 81a3f228
      Daniele E. Domenichelli authored
      Some modules change CMake minimum required version when they are
      included. For example:
      
        cmake_minimum_required(VERSION 2.8.12)
        message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
        include(CheckTypeSize)
        message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
      
      will produce the following output:
      
        2.8.12
        2.6
      
      This patch ensures that when you include a CMake module the minimum
      required version and the policies set are left unchanged.
      
      Fixes Issue #14864
      81a3f228
    • James Bigler's avatar
      FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation · 6ad14c71
      James Bigler authored
      Previously when linking the intermediate link file for separable compilation
      the CUDA_NVCC_FLAGS* were not used.  This caused tremendous confusion when
      using this feature, and I consider it to be a bug.  This change should fix
      this.
      6ad14c71
  21. 30 Apr, 2014 1 commit
  22. 14 Apr, 2014 1 commit
  23. 08 Mar, 2014 1 commit
  24. 29 Jan, 2014 1 commit
  25. 24 Oct, 2013 1 commit
  26. 15 Oct, 2013 1 commit
  27. 11 Oct, 2013 1 commit
  28. 13 Sep, 2013 1 commit
    • Brad King's avatar
      FindCUDA: Always list custom command outputs in their targets · ef27fa67
      Brad King authored
      CMake's intended interface for linking to explicit object files (marked
      with EXTERNAL_OBJECT) is that only those listed as target sources should
      be linked.  Drop FindCUDA's attempt to hide the .obj files from VS IDE
      project files, which depends on VS-version-specific behavior of linking
      custom command outputs that happen to be named "*.obj".  CMake puts
      external object files in a dedicated source group anyway.
      ef27fa67
  29. 22 Jul, 2013 1 commit
  30. 18 Apr, 2013 2 commits
  31. 14 Mar, 2013 1 commit
  32. 12 Mar, 2013 3 commits
    • James Bigler's avatar
      FindCUDA: Added cupti library. · c939b494
      James Bigler authored
      In addition to adding the cupti library, find_local_library_first has
      been renamed to cuda_find_local_library_first with a backward
      compatibility macro to find_local_library_first.  Also added
      cuda_find_local_library_first_with_path_ext to handle different paths.
      c939b494
    • James Bigler's avatar
      FindCUDA: Add support for separable compilation · 6a19150b
      James Bigler authored
      This adds a new variable, CUDA_SEPARABLE_COMPILATION, and two new
      functions, CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and
      CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS.
      
      When CUDA_SEPARABLE_COMPILATION is specified then CUDA runtime objects
      will be compiled with the separable compilation flag.  These object
      files are collected in a target named variable that can be used in
      CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and
      CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS.
      6a19150b
    • James Bigler's avatar
      FindCUDA: Remove linkage against CUDA driver library (#13084) · 3497bc2c
      James Bigler authored
      The CUDA runtime library (libcudart) doesn't depend on the driver API
      library (libcuda) and shouldn't be used to link CUDA run time codes.
      3497bc2c
  33. 20 Aug, 2012 2 commits
    • James Bigler's avatar
      Added CUDA_SOURCE_PROPERTY_FORMAT. Allows setting per file format (OBJ or PTX) · 787287cc
      James Bigler authored
      Added CUDA_SOURCE_PROPERTY_FORMAT that allows users to set the format (OBJ or PTX) on a
      per file basis.
      787287cc
    • James Bigler's avatar
      FindCUDA: Added CUDA_HOST_COMPILER variable. · db207e40
      James Bigler authored
      Added a new CUDA variable for specifying the CUDA_HOST_COMPILER.  This will allow users to
      be able to specify which host compiler to use for invoking NVCC with.  By default it will
      use the compiler used for host compilation.  This is convenient for when you want to
      specify a different compiler than the default compiler.  You end up using the same
      compiler for both the NVCC compilation and the host compilation instead of using the
      default compiler in the path for NVCC.
      db207e40
  34. 14 Aug, 2012 1 commit
    • Rolf Eike Beer's avatar
      use the find_* functions ENV parameter · b04650e1
      Rolf Eike Beer authored
      Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
      This will make sure the paths will get correctly handled through different
      platforms, especially on Windows.
      
      Also fixes one place where paths with windows delimiters (\) were hardcoded to
      use forward slashes.
      b04650e1