This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 0753c59f4551e65b9f6d422def093f55da338ad9 (commit) via 3dfe9c05dfd7eb52e3ff6dc8da0d258070bb5fbd (commit) via 03e22481886c6ea97440f54ef84df84969e5969f (commit) from 870d4341f25524a1c58a25e2289f8c00ed584845 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0753c59f4551e65b9f6d422def093f55da338ad9 commit 0753c59f4551e65b9f6d422def093f55da338ad9 Merge: 870d434 3dfe9c0 Author: Bill Hoffman <bill.hoff...@kitware.com> AuthorDate: Fri Jun 12 14:24:37 2015 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Jun 12 14:24:37 2015 -0400 Merge topic 'fix_cuda_for_ccache' into next 3dfe9c05 Fix FindCUDA to only realpath the host compiler if it is clang linked to cc. 03e22481 CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dfe9c05dfd7eb52e3ff6dc8da0d258070bb5fbd commit 3dfe9c05dfd7eb52e3ff6dc8da0d258070bb5fbd Author: Bill Hoffman <bill.hoff...@kitware.com> AuthorDate: Fri Jun 12 14:16:09 2015 -0400 Commit: Bill Hoffman <bill.hoff...@kitware.com> CommitDate: Fri Jun 12 14:16:09 2015 -0400 Fix FindCUDA to only realpath the host compiler if it is clang linked to cc. This fixes ccache on all other platforms. CUDA with ccache failed because it followed the symlink for ccache to cc and tried to use ccache directly as a compiler. diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index e8e1fb1..f4b0783 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -468,17 +468,31 @@ set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.") if(CMAKE_GENERATOR MATCHES "Visual Studio") set(CUDA_HOST_COMPILER "$(VCInstallDir)bin" CACHE FILEPATH "Host side compiler used by NVCC") else() - # Using cc which is symlink to clang may let NVCC think it is GCC and issue - # unhandled -dumpspecs 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. - if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER) - get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH) + if(APPLE + AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" + AND "${CMAKE_C_COMPILER}" MATCHES "/cc$") + # Using cc which is symlink to clang may let NVCC think it is GCC and issue + # unhandled -dumpspecs 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. + # Only care about this on APPLE with clang to avoid + # following symlinks to things like ccache + if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER) + get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH) + # if the real path does not end up being clang then + # go back to using CMAKE_C_COMPILER + if(NOT "${c_compiler_realpath}" MATCHES "/clang$") + set(c_compiler_realpath "${CMAKE_C_COMPILER}") + endif() + else() + set(c_compiler_realpath "") + endif() + set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC") else() - set(c_compiler_realpath "") + set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" + CACHE FILEPATH "Host side compiler used by NVCC") endif() - set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC") endif() # Propagate the host flags to the host compiler via -Xcompiler ----------------------------------------------------------------------- Summary of changes: Modules/FindCUDA.cmake | 32 +++++++++++++++++++++++--------- Source/CMakeVersion.cmake | 2 +- 2 files changed, 24 insertions(+), 10 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits