1 set(files 2 altivec.h 3 avxintrin.h 4 emmintrin.h 5 float.h 6 immintrin.h 7 iso646.h 8 limits.h 9 mm_malloc.h 10 mmintrin.h 11 pmmintrin.h 12 smmintrin.h 13 stdarg.h 14 stdbool.h 15 stddef.h 16 stdint.h 17 tgmath.h 18 tmmintrin.h 19 xmmintrin.h) 20 21 if (MSVC_IDE OR XCODE) 22 set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include) 23 else () 24 set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) 25 endif () 26 27 # Generate arm_neon.h 28 set(LLVM_TARGET_DEFINITIONS ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) 29 tablegen(arm_neon.h.inc -gen-arm-neon) 30 31 add_custom_command(OUTPUT ${output_dir}/arm_neon.h 32 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc 33 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${output_dir}/arm_neon.h 34 COMMENT "Copying clang's arm_neon.h...") 35 36 foreach( f ${files} ) 37 set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) 38 set( dst ${output_dir}/${f} ) 39 add_custom_command(OUTPUT ${dst} 40 DEPENDS ${src} 41 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} 42 COMMENT "Copying clang's ${f}...") 43 endforeach( f ) 44 45 add_custom_target(clang-headers ALL 46 DEPENDS ${files} ${output_dir}/arm_neon.h) 47 48 install(FILES ${files} ${output_dir}/arm_neon.h 49 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 50 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 51