Commit Graph

21 Commits

Author SHA1 Message Date
Adam Strzelecki 84e3fde94d FindCUDA: Avoid if() auto-dereference in string comparisons
This silences possible CMP0054 warnings.
2014-09-24 10:10:42 -04:00
Adam Strzelecki 32bcec5fab FindCUDA: Fix OSX Clang & no C language enabled
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.
2014-06-30 11:23:36 -04:00
Rolf Eike Beer 7eacbaed4d Replace MATCHES ".+" tests with NOT STREQUAL "" 2014-04-14 18:17:23 +02:00
Rolf Eike Beer 5bd48ac534 Replace string(REGEX REPLACE) with string(REPLACE) where possible
The simple replacement is much faster.
2014-04-14 18:17:05 +02:00
Rolf Eike Beer 2622bc3f65 Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
2014-04-14 18:16:58 +02:00
Andreas Mohr ddac8d3d2d Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
David Cole 3dea63d04d Merge topic 'topics/FindCUDA/Add-CUDA_HOST_COMPILER'
db207e4 FindCUDA: Added CUDA_HOST_COMPILER variable.
2012-09-18 16:41:20 -04:00
James Bigler db207e4065 FindCUDA: Added CUDA_HOST_COMPILER variable.
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.
2012-08-20 15:14:37 -06:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
David Cole 9f18f64c7c Merge topic 'topics/FindCUDA/Quote-fixes'
c3c7a0c Fixes for handling quotes in args and other places (Fix Bug 11726 and 12099).
2011-12-06 15:08:12 -05:00
James Bigler c3c7a0cfb8 Fixes for handling quotes in args and other places (Fix Bug 11726 and 12099). 2011-12-05 17:16:05 -07:00
James Bigler 83d4eeadac Add work around for CUDA in UNC paths.
Nvcc can emit '/path' instead of '//path' which can cause a lot of grief later.  We test
to see if the file exists, if it doesn't then we see if the file exists with '/'
prepended.  Files that don't exist won't be added to the list.
2011-12-05 16:54:06 -07:00
James Bigler d2d3672f1c Define __CUDACC__ during dependency scanning, since NVCC doesn't. 2010-01-28 12:58:22 -05:00
James Bigler 2316e04d13 Reordered the arguments, so that user generated arguments go last and thus get precedence. 2010-01-08 12:14:21 -05:00
James Bigler c9235c0159 Don't allow -G -M on CUDA versions less than 3.0. 2009-11-30 17:05:18 -05:00
James Bigler 94fff7af35 Fix Xcode build.
Move the make_directory command to the main target, so that CMAKE_CFG_INTDIR
will get expanded by the build tool.
2009-10-06 22:52:52 -04:00
James Bigler 7112227c18 Updated copyright notice to conform to NVIDIA guidelines. 2009-10-05 17:14:33 -04:00
James Bigler b0744ad969 Updated the license on top of each file. 2009-09-29 00:07:46 -04:00
Brad King 393b09cb85 Convert FindCUDA helper newlines from CRLF to LF
These files were committed to the repository with Windows newlines.
This converts them to Unix newlines so they will show up natively.
2009-09-28 11:04:33 -04:00
James Bigler fb9d7d3c59 Added a command to make the output directory. This is to fix the XCode build that uses a different output directory than other systems, and rather than try to match that we'll just make it. 2009-09-23 00:50:16 -04:00
James Bigler eaaf71d7b3 Initial version of FindCUDA script. Still needs documentation formatting. 2009-09-15 02:38:20 -04:00