From c302f002f5e88a7ce29026bf9b006ff6774892b5 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 28 May 2010 04:22:06 +0000 Subject: [PATCH] Add CMake goop to get arm_neon.h generated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104934 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt index 047fdb30ce..7942df9679 100644 --- a/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt @@ -1,6 +1,5 @@ set(files altivec.h - arm_neon.h emmintrin.h float.h iso646.h @@ -22,6 +21,15 @@ else () set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) endif () +# Generate arm_neon.h +set(LLVM_TARGET_DEFINITIONS arm_neon.td) +tablegen(arm_neon.h.inc -gen-arm-neon-header) +add_custom_target(ClangARMNeon DEPENDS arm_neon.h.inc) + +add_custom_command(OUTPUT ${output_dir}/arm_neon.h + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${output_dir}/arm_neon.h + COMMENT "Copying clang's arm_neon.h...") foreach( f ${files} ) set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) @@ -33,8 +41,8 @@ foreach( f ${files} ) endforeach( f ) add_custom_target(clang-headers ALL - DEPENDS ${files}) + DEPENDS ${files} ${output_dir}/arm_neon.h) -install(FILES ${files} +install(FILES ${files} ${output_dir}/arm_neon.h PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) -- 2.40.0