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