Merge topic 'FindCUDA-flags-genex'

6b190b5c FindCUDA: Add support for generator expressions in CUDA_NVCC_FLAGS
This commit is contained in:
Brad King 2016-05-25 09:34:26 -04:00 committed by CMake Topic Stage
commit 9ebc209288
1 changed files with 7 additions and 2 deletions

View File

@ -1395,7 +1395,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(cmake_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.depend") set(cmake_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.depend")
set(NVCC_generated_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.NVCC-depend") set(NVCC_generated_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.NVCC-depend")
set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt") set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt")
set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake") set(custom_target_script_pregen "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake.pre-gen")
set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}$<$<BOOL:$<CONFIG>>:.$<CONFIG>>.cmake")
# Setup properties for obj files: # Setup properties for obj files:
if( NOT cuda_compile_to_external_module ) if( NOT cuda_compile_to_external_module )
@ -1436,7 +1437,11 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
endif() endif()
# Configure the build script # Configure the build script
configure_file("${CUDA_run_nvcc}" "${custom_target_script}" @ONLY) configure_file("${CUDA_run_nvcc}" "${custom_target_script_pregen}" @ONLY)
file(GENERATE
OUTPUT "${custom_target_script}"
INPUT "${custom_target_script_pregen}"
)
# So if a user specifies the same cuda file as input more than once, you # So if a user specifies the same cuda file as input more than once, you
# can have bad things happen with dependencies. Here we check an option # can have bad things happen with dependencies. Here we check an option