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