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
|
2012-10-11 09:10:04 +08:00
|
|
|
f16cintrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
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
|
2013-09-07 04:11:28 +08:00
|
|
|
Intrin.h
|
2011-02-27 21:33:31 +08:00
|
|
|
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
|
2013-03-27 01:52:08 +08:00
|
|
|
prfchwintrin.h
|
2013-03-29 13:17:55 +08:00
|
|
|
rdseedintrin.h
|
2012-11-10 13:17:46 +08:00
|
|
|
rtmintrin.h
|
2013-09-19 21:22:04 +08:00
|
|
|
shaintrin.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
|
2013-01-18 06:16:11 +08:00
|
|
|
stdnoreturn.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
|
2012-11-06 07:30:26 +08:00
|
|
|
__wmmintrin_aes.h
|
|
|
|
__wmmintrin_pclmul.h
|
2011-02-27 21:33:31 +08:00
|
|
|
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
|
|
|
|
2013-08-28 13:38:43 +08:00
|
|
|
set(output_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/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)
|
2013-08-28 13:38:43 +08:00
|
|
|
set(other_output_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib/clang/${CLANG_VERSION}/include)
|
2010-10-12 07:17:59 +08:00
|
|
|
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
|
|
|
|
2013-03-30 05:51:40 +08:00
|
|
|
if (other_output_dir)
|
2013-08-28 13:38:43 +08:00
|
|
|
if(UNIX)
|
|
|
|
add_custom_command(TARGET clang-headers POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib/clang" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/clang")
|
|
|
|
endif()
|
2013-03-30 05:51:40 +08:00
|
|
|
endif ()
|
|
|
|
|
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)
|