[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2800-gf6b2462

Robert Maynard robert.maynard at kitware.com
Thu Apr 18 09:09:23 EDT 2013


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  f6b24625389d80acb6c55b294b9d56bc652c5892 (commit)
       via  cd2d2480cc84c4d4b54cee76061e1aa5e57cb832 (commit)
      from  db303a426c29011d766496b004766f3d9e6f5f3a (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=f6b24625389d80acb6c55b294b9d56bc652c5892
commit f6b24625389d80acb6c55b294b9d56bc652c5892
Merge: db303a4 cd2d248
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Apr 18 09:09:22 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 18 09:09:22 2013 -0400

    Merge topic 'cuda_compute_build_path' into next
    
    cd2d248 FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd2d2480cc84c4d4b54cee76061e1aa5e57cb832
commit cd2d2480cc84c4d4b54cee76061e1aa5e57cb832
Author:     Mathias Gaunard <mathias at gaunard.com>
AuthorDate: Wed Mar 27 11:33:36 2013 +0100
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Thu Apr 18 09:07:52 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


More information about the Cmake-commits mailing list