[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2792-g5ce754a
Robert Maynard
robert.maynard at kitware.com
Wed Apr 17 10:34:26 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 5ce754a7c8f1944a4ce6ccb2bd4593c40f0705d8 (commit)
via 2d8355b1f867ef188e53efef0588a6b9d1959bee (commit)
from 556feed4c97679914ab02b73ecc052b04ce5eb0b (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=5ce754a7c8f1944a4ce6ccb2bd4593c40f0705d8
commit 5ce754a7c8f1944a4ce6ccb2bd4593c40f0705d8
Merge: 556feed 2d8355b
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Wed Apr 17 10:34:25 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 17 10:34:25 2013 -0400
Merge topic 'cuda_compute_build_path' into next
2d8355b make CUDA_COMPUTE_BUILD_PATH use relative paths to binary dir.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d8355b1f867ef188e53efef0588a6b9d1959bee
commit 2d8355b1f867ef188e53efef0588a6b9d1959bee
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: Wed Apr 17 08:58:31 2013 -0400
make CUDA_COMPUTE_BUILD_PATH use 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:
Modules/FindCUDA.cmake | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list