1set(files 2 adxintrin.h 3 altivec.h 4 ammintrin.h 5 arm_acle.h 6 avx2intrin.h 7 avx512bwintrin.h 8 avx512cdintrin.h 9 avx512erintrin.h 10 avx512fintrin.h 11 avx512vlbwintrin.h 12 avx512vlintrin.h 13 avx512dqintrin.h 14 avx512vldqintrin.h 15 avxintrin.h 16 bmi2intrin.h 17 bmiintrin.h 18 __clang_cuda_runtime_wrapper.h 19 cpuid.h 20 cuda_builtin_vars.h 21 emmintrin.h 22 f16cintrin.h 23 float.h 24 fma4intrin.h 25 fmaintrin.h 26 fxsrintrin.h 27 htmintrin.h 28 htmxlintrin.h 29 ia32intrin.h 30 immintrin.h 31 Intrin.h 32 inttypes.h 33 iso646.h 34 limits.h 35 lzcntintrin.h 36 mm3dnow.h 37 mmintrin.h 38 mm_malloc.h 39 module.modulemap 40 nmmintrin.h 41 pmmintrin.h 42 popcntintrin.h 43 prfchwintrin.h 44 rdseedintrin.h 45 rtmintrin.h 46 s390intrin.h 47 shaintrin.h 48 smmintrin.h 49 stdalign.h 50 stdarg.h 51 stdatomic.h 52 stdbool.h 53 stddef.h 54 __stddef_max_align_t.h 55 stdint.h 56 stdnoreturn.h 57 tbmintrin.h 58 tgmath.h 59 tmmintrin.h 60 unwind.h 61 vadefs.h 62 varargs.h 63 vecintrin.h 64 __wmmintrin_aes.h 65 wmmintrin.h 66 __wmmintrin_pclmul.h 67 x86intrin.h 68 xmmintrin.h 69 xopintrin.h 70 xsaveintrin.h 71 xsaveoptintrin.h 72 xsavecintrin.h 73 xsavesintrin.h 74 xtestintrin.h 75 ) 76 77set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) 78 79# Generate arm_neon.h 80clang_tablegen(arm_neon.h -gen-arm-neon 81 SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) 82 83set(out_files) 84foreach( f ${files} ) 85 set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) 86 set( dst ${output_dir}/${f} ) 87 add_custom_command(OUTPUT ${dst} 88 DEPENDS ${src} 89 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} 90 COMMENT "Copying clang's ${f}...") 91 list(APPEND out_files ${dst}) 92endforeach( f ) 93 94add_custom_command(OUTPUT ${output_dir}/arm_neon.h 95 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h 96 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h ${output_dir}/arm_neon.h 97 COMMENT "Copying clang's arm_neon.h...") 98list(APPEND out_files ${output_dir}/arm_neon.h) 99 100add_custom_target(clang-headers ALL DEPENDS ${out_files}) 101set_target_properties(clang-headers PROPERTIES FOLDER "Misc") 102 103install( 104 FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h 105 COMPONENT clang-headers 106 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 107 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 108 109if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. 110 add_custom_target(install-clang-headers 111 DEPENDS 112 COMMAND "${CMAKE_COMMAND}" 113 -DCMAKE_INSTALL_COMPONENT=clang-headers 114 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") 115endif() 116