From: Justin Lebar Date: Sun, 9 Oct 2016 00:27:39 +0000 (+0000) Subject: [CUDA] Don't install cuda_wrappers/{algorithm,complex} into the main include dir. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4178633e3e61e780d9729a9952e72a94a1d993d;p=clang [CUDA] Don't install cuda_wrappers/{algorithm,complex} into the main include dir. This is obviously wrong -- if we do this, then all compiles will pick up these wrappers, which is not what we want. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283683 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt index 23afab9478..7bc91ace93 100644 --- a/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt @@ -29,8 +29,6 @@ set(files __clang_cuda_math_forward_declares.h __clang_cuda_runtime_wrapper.h cpuid.h - cuda_wrappers/algorithm - cuda_wrappers/complex clflushoptintrin.h emmintrin.h f16cintrin.h @@ -92,6 +90,11 @@ set(files xtestintrin.h ) +set(cuda_wrapper_files + cuda_wrappers/algorithm + cuda_wrappers/complex +) + set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) # Generate arm_neon.h @@ -99,7 +102,7 @@ clang_tablegen(arm_neon.h -gen-arm-neon SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) set(out_files) -foreach( f ${files} ) +foreach( f ${files} ${cuda_wrapper_files} ) set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) set( dst ${output_dir}/${f} ) add_custom_command(OUTPUT ${dst} @@ -124,6 +127,12 @@ install( PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) +install( + FILES ${cuda_wrapper_files} + COMPONENT clang-headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include/cuda_wrappers) + if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. add_custom_target(install-clang-headers DEPENDS clang-headers