Merge topic 'Cuda_WRAP_SRCS_duplicates'

32b582d FindCUDA: Remove duplicate entries from INCLUDE_DIRECTORIES.
This commit is contained in:
Brad King 2013-05-16 14:37:13 -04:00 committed by CMake Topic Stage
commit 3256ecb7b9
1 changed files with 3 additions and 0 deletions

View File

@ -1027,7 +1027,10 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Initialize our list of includes with the user ones followed by the CUDA system ones. # Initialize our list of includes with the user ones followed by the CUDA system ones.
set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}") set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
# Get the include directories for this directory and use them for our nvcc command. # Get the include directories for this directory and use them for our nvcc command.
# Remove duplicate entries which may be present since include_directories
# in CMake >= 2.8.8 does not remove them.
get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES) get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
list(REMOVE_DUPLICATES CUDA_NVCC_INCLUDE_DIRECTORIES)
if(CUDA_NVCC_INCLUDE_DIRECTORIES) if(CUDA_NVCC_INCLUDE_DIRECTORIES)
foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES}) foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir}) list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir})