Commit Graph

14 Commits

Author SHA1 Message Date
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
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
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 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