2008-10-26 08:56:18 +08:00
|
|
|
set(files
|
2010-04-14 11:54:58 +08:00
|
|
|
altivec.h
|
2012-05-30 03:36:17 +08:00
|
|
|
ammintrin.h
|
2010-08-05 06:03:36 +08:00
|
|
|
avxintrin.h
|
2011-12-19 13:04:33 +08:00
|
|
|
avx2intrin.h
|
2011-12-25 20:47:46 +08:00
|
|
|
bmiintrin.h
|
2011-12-26 11:20:06 +08:00
|
|
|
bmi2intrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
emmintrin.h
|
|
|
|
float.h
|
2011-12-30 18:38:16 +08:00
|
|
|
fma4intrin.h
|
2012-06-04 11:42:47 +08:00
|
|
|
fmaintrin.h
|
2010-08-21 02:04:07 +08:00
|
|
|
immintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
iso646.h
|
|
|
|
limits.h
|
2011-12-25 20:47:46 +08:00
|
|
|
lzcntintrin.h
|
2011-04-15 23:11:21 +08:00
|
|
|
mm3dnow.h
|
2011-02-27 21:33:31 +08:00
|
|
|
mmintrin.h
|
|
|
|
mm_malloc.h
|
|
|
|
nmmintrin.h
|
|
|
|
pmmintrin.h
|
2011-12-30 05:42:29 +08:00
|
|
|
popcntintrin.h
|
2010-08-21 01:24:02 +08:00
|
|
|
smmintrin.h
|
2011-09-30 02:04:28 +08:00
|
|
|
stdalign.h
|
2011-02-27 21:33:31 +08:00
|
|
|
stdarg.h
|
|
|
|
stdbool.h
|
|
|
|
stddef.h
|
|
|
|
stdint.h
|
2009-06-07 15:09:23 +08:00
|
|
|
tgmath.h
|
|
|
|
tmmintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
varargs.h
|
|
|
|
wmmintrin.h
|
|
|
|
x86intrin.h
|
|
|
|
xmmintrin.h
|
2012-06-10 08:39:38 +08:00
|
|
|
xopintrin.h
|
2011-12-06 23:46:47 +08:00
|
|
|
cpuid.h
|
2011-12-08 13:01:39 +08:00
|
|
|
unwind.h
|
2012-01-30 04:52:14 +08:00
|
|
|
module.map
|
2011-02-27 21:33:31 +08:00
|
|
|
)
|
2008-10-26 08:56:18 +08:00
|
|
|
|
2010-10-20 02:06:10 +08:00
|
|
|
set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include)
|
2010-10-12 07:17:59 +08:00
|
|
|
|
|
|
|
# If we are in an IDE that has a configuration directory, we need to
|
|
|
|
# create a second copy of the headers so that 'clang' can find them if
|
|
|
|
# it's run from the build directory.
|
|
|
|
if(MSVC_IDE OR XCODE)
|
|
|
|
set(other_output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include)
|
|
|
|
endif()
|
2009-06-17 04:13:51 +08:00
|
|
|
|
2010-05-28 12:22:06 +08:00
|
|
|
# Generate arm_neon.h
|
2011-02-21 06:06:32 +08:00
|
|
|
clang_tablegen(arm_neon.h.inc -gen-arm-neon
|
|
|
|
SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td)
|
2010-05-28 12:22:06 +08:00
|
|
|
|
2010-10-12 07:17:59 +08:00
|
|
|
set(out_files)
|
2008-10-26 08:56:18 +08:00
|
|
|
foreach( f ${files} )
|
|
|
|
set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
|
|
|
|
set( dst ${output_dir}/${f} )
|
|
|
|
add_custom_command(OUTPUT ${dst}
|
|
|
|
DEPENDS ${src}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
|
|
|
|
COMMENT "Copying clang's ${f}...")
|
2010-10-12 07:17:59 +08:00
|
|
|
list(APPEND out_files ${dst})
|
|
|
|
|
|
|
|
if(other_output_dir)
|
|
|
|
set(other_dst ${other_output_dir}/${f})
|
|
|
|
add_custom_command(OUTPUT ${other_dst}
|
|
|
|
DEPENDS ${src}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${other_dst}
|
|
|
|
COMMENT "Copying clang's ${f}...")
|
|
|
|
list(APPEND out_files ${other_dst})
|
|
|
|
endif()
|
2008-10-26 08:56:18 +08:00
|
|
|
endforeach( f )
|
|
|
|
|
2010-10-12 07:17:59 +08:00
|
|
|
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...")
|
|
|
|
list(APPEND out_files ${output_dir}/arm_neon.h)
|
|
|
|
|
|
|
|
if (other_output_dir)
|
|
|
|
set(other_dst ${other_output_dir}/arm_neon.h)
|
|
|
|
add_custom_command(OUTPUT ${other_dst}
|
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${other_dst}
|
|
|
|
COMMENT "Copying clang's arm_neon.h...")
|
|
|
|
list(APPEND out_files ${other_dst})
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
add_custom_target(clang-headers ALL DEPENDS ${out_files})
|
2011-02-21 06:06:44 +08:00
|
|
|
set_target_properties(clang-headers PROPERTIES FOLDER "Misc")
|
2008-10-26 08:56:18 +08:00
|
|
|
|
2010-05-28 12:22:06 +08:00
|
|
|
install(FILES ${files} ${output_dir}/arm_neon.h
|
2008-10-26 08:56:18 +08:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
2009-10-28 05:15:21 +08:00
|
|
|
DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|