]> granicus.if.org Git - clang/commitdiff
[CUDA] Don't install cuda_wrappers/{algorithm,complex} into the main include dir.
authorJustin Lebar <jlebar@google.com>
Sun, 9 Oct 2016 00:27:39 +0000 (00:27 +0000)
committerJustin Lebar <jlebar@google.com>
Sun, 9 Oct 2016 00:27:39 +0000 (00:27 +0000)
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

lib/Headers/CMakeLists.txt

index 23afab9478661ae0262b6e2d9242400bfba90c62..7bc91ace935edc6106d7d78b5e6b817a37c422db 100644 (file)
@@ -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