Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 1 | set(files |
Chris Lattner | dd17394 | 2010-04-14 03:54:58 +0000 | [diff] [blame] | 2 | altivec.h |
Benjamin Kramer | 6ea73b2 | 2012-05-29 19:36:17 +0000 | [diff] [blame] | 3 | ammintrin.h |
Bruno Cardoso Lopes | 55db5b8 | 2010-08-04 22:03:36 +0000 | [diff] [blame] | 4 | avxintrin.h |
Craig Topper | 925be54 | 2011-12-19 05:04:33 +0000 | [diff] [blame] | 5 | avx2intrin.h |
NAKAMURA Takumi | 6ab9f02 | 2011-12-25 12:47:46 +0000 | [diff] [blame] | 6 | bmiintrin.h |
NAKAMURA Takumi | b5409c5 | 2011-12-26 03:20:06 +0000 | [diff] [blame] | 7 | bmi2intrin.h |
Oscar Fuentes | be7025e | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 8 | emmintrin.h |
| 9 | float.h |
NAKAMURA Takumi | 5c76db3 | 2011-12-30 10:38:16 +0000 | [diff] [blame] | 10 | fma4intrin.h |
Craig Topper | 97075fb | 2012-06-04 03:42:47 +0000 | [diff] [blame] | 11 | fmaintrin.h |
Benjamin Kramer | 033b7b3 | 2010-08-20 18:04:07 +0000 | [diff] [blame] | 12 | immintrin.h |
Oscar Fuentes | be7025e | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 13 | iso646.h |
| 14 | limits.h |
NAKAMURA Takumi | 6ab9f02 | 2011-12-25 12:47:46 +0000 | [diff] [blame] | 15 | lzcntintrin.h |
Michael J. Spencer | 408d5d1 | 2011-04-15 15:11:21 +0000 | [diff] [blame] | 16 | mm3dnow.h |
Oscar Fuentes | be7025e | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 17 | mmintrin.h |
| 18 | mm_malloc.h |
| 19 | nmmintrin.h |
| 20 | pmmintrin.h |
Richard Smith | 0945f20 | 2011-12-29 21:42:29 +0000 | [diff] [blame] | 21 | popcntintrin.h |
Chris Lattner | 3a70f86 | 2010-08-20 17:24:02 +0000 | [diff] [blame] | 22 | smmintrin.h |
Peter Collingbourne | 82d0b0a | 2011-09-29 18:04:28 +0000 | [diff] [blame] | 23 | stdalign.h |
Oscar Fuentes | be7025e | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 24 | stdarg.h |
| 25 | stdbool.h |
| 26 | stddef.h |
| 27 | stdint.h |
Douglas Gregor | 0602600 | 2009-06-07 07:09:23 +0000 | [diff] [blame] | 28 | tgmath.h |
| 29 | tmmintrin.h |
Oscar Fuentes | be7025e | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 30 | varargs.h |
| 31 | wmmintrin.h |
| 32 | x86intrin.h |
| 33 | xmmintrin.h |
Craig Topper | 239c030 | 2012-06-10 00:39:38 +0000 | [diff] [blame^] | 34 | xopintrin.h |
Rafael Espindola | 82e11cd | 2011-12-06 15:46:47 +0000 | [diff] [blame] | 35 | cpuid.h |
Rafael Espindola | d85c1e9 | 2011-12-08 05:01:39 +0000 | [diff] [blame] | 36 | unwind.h |
Douglas Gregor | 3e80d8a | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 37 | module.map |
Oscar Fuentes | be7025e | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 38 | ) |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 39 | |
Douglas Gregor | 105716e | 2010-10-19 18:06:10 +0000 | [diff] [blame] | 40 | set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) |
Douglas Gregor | d1e6fdb | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 41 | |
| 42 | # If we are in an IDE that has a configuration directory, we need to |
| 43 | # create a second copy of the headers so that 'clang' can find them if |
| 44 | # it's run from the build directory. |
| 45 | if(MSVC_IDE OR XCODE) |
| 46 | set(other_output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include) |
| 47 | endif() |
Douglas Gregor | ebfc180 | 2009-06-16 20:13:51 +0000 | [diff] [blame] | 48 | |
Douglas Gregor | c302f00 | 2010-05-28 04:22:06 +0000 | [diff] [blame] | 49 | # Generate arm_neon.h |
Oscar Fuentes | c8da1ec | 2011-02-20 22:06:32 +0000 | [diff] [blame] | 50 | clang_tablegen(arm_neon.h.inc -gen-arm-neon |
| 51 | SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) |
Douglas Gregor | c302f00 | 2010-05-28 04:22:06 +0000 | [diff] [blame] | 52 | |
Douglas Gregor | d1e6fdb | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 53 | set(out_files) |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 54 | foreach( f ${files} ) |
| 55 | set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) |
| 56 | set( dst ${output_dir}/${f} ) |
| 57 | add_custom_command(OUTPUT ${dst} |
| 58 | DEPENDS ${src} |
| 59 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} |
| 60 | COMMENT "Copying clang's ${f}...") |
Douglas Gregor | d1e6fdb | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 61 | list(APPEND out_files ${dst}) |
| 62 | |
| 63 | if(other_output_dir) |
| 64 | set(other_dst ${other_output_dir}/${f}) |
| 65 | add_custom_command(OUTPUT ${other_dst} |
| 66 | DEPENDS ${src} |
| 67 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${other_dst} |
| 68 | COMMENT "Copying clang's ${f}...") |
| 69 | list(APPEND out_files ${other_dst}) |
| 70 | endif() |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 71 | endforeach( f ) |
| 72 | |
Douglas Gregor | d1e6fdb | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 73 | add_custom_command(OUTPUT ${output_dir}/arm_neon.h |
| 74 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc |
| 75 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${output_dir}/arm_neon.h |
| 76 | COMMENT "Copying clang's arm_neon.h...") |
| 77 | list(APPEND out_files ${output_dir}/arm_neon.h) |
| 78 | |
| 79 | if (other_output_dir) |
| 80 | set(other_dst ${other_output_dir}/arm_neon.h) |
| 81 | add_custom_command(OUTPUT ${other_dst} |
| 82 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc |
| 83 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${other_dst} |
| 84 | COMMENT "Copying clang's arm_neon.h...") |
| 85 | list(APPEND out_files ${other_dst}) |
| 86 | endif () |
| 87 | |
| 88 | add_custom_target(clang-headers ALL DEPENDS ${out_files}) |
Oscar Fuentes | a3f787c | 2011-02-20 22:06:44 +0000 | [diff] [blame] | 89 | set_target_properties(clang-headers PROPERTIES FOLDER "Misc") |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 90 | |
Douglas Gregor | c302f00 | 2010-05-28 04:22:06 +0000 | [diff] [blame] | 91 | install(FILES ${files} ${output_dir}/arm_neon.h |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 92 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
Oscar Fuentes | 25950e8 | 2009-10-27 21:15:21 +0000 | [diff] [blame] | 93 | DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) |