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  db303a426c29011d766496b004766f3d9e6f5f3a (commit)
       via  a8c4ff269f49d5f832cd91da54bf799958b78650 (commit)
      from  14d3e9c11ee22535c2f6ecd0fb0c396859381953 (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=db303a426c29011d766496b004766f3d9e6f5f3a
commit db303a426c29011d766496b004766f3d9e6f5f3a
Merge: 14d3e9c a8c4ff2
Author:     Robert Maynard <robert.mayn...@kitware.com>
AuthorDate: Thu Apr 18 09:00:35 2013 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Apr 18 09:00:35 2013 -0400

    Merge topic 'cuda_compute_build_path' into next
    
    a8c4ff2 FindCuda: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8c4ff269f49d5f832cd91da54bf799958b78650
commit a8c4ff269f49d5f832cd91da54bf799958b78650
Author:     Mathias Gaunard <math...@gaunard.com>
AuthorDate: Wed Mar 27 11:33:36 2013 +0100
Commit:     Robert Maynard <robert.mayn...@kitware.com>
CommitDate: Thu Apr 18 08:51:11 2013 -0400

    FindCuda: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.
    
    make CUDA_COMPUTE_BUILD_PATH use a relative path to the current
    binary directory instead of the current source directory if the source
    file considered is in the current binary directory. This is done to
    shorten the paths given to the compiler.

diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 423ad3d..8248624 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -920,7 +920,13 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
   if (IS_ABSOLUTE "${bpath}")
     # Absolute paths are generally unnessary, especially if something like
     # file(GLOB_RECURSE) is used to pick up the files.
-    file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
+
+    string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos)
+    if (_binary_dir_pos EQUAL 0)
+      file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}")
+    else()
+      file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
+    endif()
   endif()
 
   # This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in 
the

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to