| 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 |
| NAKAMURA Takumi | 16ff8fd | 2012-10-11 01:10:04 +0000 | [diff] [blame] | 9 | f16cintrin.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 10 | float.h |
| NAKAMURA Takumi | 96d77daa | 2011-12-30 10:38:16 +0000 | [diff] [blame] | 11 | fma4intrin.h |
| Craig Topper | 2b1eda3 | 2012-06-04 03:42:47 +0000 | [diff] [blame] | 12 | fmaintrin.h |
| Benjamin Kramer | 65b9f7b | 2010-08-20 18:04:07 +0000 | [diff] [blame] | 13 | immintrin.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 14 | iso646.h |
| Eric Christopher | e276f88 | 2013-09-06 20:11:28 +0000 | [diff] [blame] | 15 | Intrin.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 16 | limits.h |
| NAKAMURA Takumi | dceeeb8 | 2011-12-25 12:47:46 +0000 | [diff] [blame] | 17 | lzcntintrin.h |
| Michael J. Spencer | 1737c9e | 2011-04-15 15:11:21 +0000 | [diff] [blame] | 18 | mm3dnow.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 19 | mmintrin.h |
| 20 | mm_malloc.h |
| 21 | nmmintrin.h |
| 22 | pmmintrin.h |
| Richard Smith | 6b751dc | 2011-12-29 21:42:29 +0000 | [diff] [blame] | 23 | popcntintrin.h |
| Michael Liao | 74f4eaf | 2013-03-26 17:52:08 +0000 | [diff] [blame] | 24 | prfchwintrin.h |
| Michael Liao | ffaae35 | 2013-03-29 05:17:55 +0000 | [diff] [blame] | 25 | rdseedintrin.h |
| Michael Liao | 625a875 | 2012-11-10 05:17:46 +0000 | [diff] [blame] | 26 | rtmintrin.h |
| Ben Langmuir | 58078d0 | 2013-09-19 13:22:04 +0000 | [diff] [blame^] | 27 | shaintrin.h |
| Chris Lattner | 1b55b75 | 2010-08-20 17:24:02 +0000 | [diff] [blame] | 28 | smmintrin.h |
| Peter Collingbourne | 2f3cf4b | 2011-09-29 18:04:28 +0000 | [diff] [blame] | 29 | stdalign.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 30 | stdarg.h |
| 31 | stdbool.h |
| 32 | stddef.h |
| 33 | stdint.h |
| Richard Smith | 0015f09 | 2013-01-17 22:16:11 +0000 | [diff] [blame] | 34 | stdnoreturn.h |
| Douglas Gregor | e183993 | 2009-06-07 07:09:23 +0000 | [diff] [blame] | 35 | tgmath.h |
| 36 | tmmintrin.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 37 | varargs.h |
| 38 | wmmintrin.h |
| Douglas Gregor | dc779ab | 2012-11-05 23:30:26 +0000 | [diff] [blame] | 39 | __wmmintrin_aes.h |
| 40 | __wmmintrin_pclmul.h |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 41 | x86intrin.h |
| 42 | xmmintrin.h |
| Craig Topper | 33b6d5e | 2012-06-10 00:39:38 +0000 | [diff] [blame] | 43 | xopintrin.h |
| Rafael Espindola | 488ea47 | 2011-12-06 15:46:47 +0000 | [diff] [blame] | 44 | cpuid.h |
| Rafael Espindola | 18c7920 | 2011-12-08 05:01:39 +0000 | [diff] [blame] | 45 | unwind.h |
| Douglas Gregor | 3f09de6 | 2012-01-29 20:52:14 +0000 | [diff] [blame] | 46 | module.map |
| Oscar Fuentes | 6401523 | 2011-02-27 13:33:31 +0000 | [diff] [blame] | 47 | ) |
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 48 | |
| Ted Kremenek | 80655be | 2013-08-28 05:38:43 +0000 | [diff] [blame] | 49 | set(output_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/clang/${CLANG_VERSION}/include) |
| Douglas Gregor | bd82998 | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 50 | |
| 51 | # If we are in an IDE that has a configuration directory, we need to |
| 52 | # create a second copy of the headers so that 'clang' can find them if |
| 53 | # it's run from the build directory. |
| 54 | if(MSVC_IDE OR XCODE) |
| Ted Kremenek | 80655be | 2013-08-28 05:38:43 +0000 | [diff] [blame] | 55 | set(other_output_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib/clang/${CLANG_VERSION}/include) |
| Douglas Gregor | bd82998 | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 56 | endif() |
| Douglas Gregor | 274a6b4 | 2009-06-16 20:13:51 +0000 | [diff] [blame] | 57 | |
| Douglas Gregor | 1f1be08 | 2010-05-28 04:22:06 +0000 | [diff] [blame] | 58 | # Generate arm_neon.h |
| Oscar Fuentes | 6f72540 | 2011-02-20 22:06:32 +0000 | [diff] [blame] | 59 | clang_tablegen(arm_neon.h.inc -gen-arm-neon |
| 60 | SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) |
| Douglas Gregor | 1f1be08 | 2010-05-28 04:22:06 +0000 | [diff] [blame] | 61 | |
| Douglas Gregor | bd82998 | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 62 | set(out_files) |
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 63 | foreach( f ${files} ) |
| 64 | set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) |
| 65 | set( dst ${output_dir}/${f} ) |
| 66 | add_custom_command(OUTPUT ${dst} |
| 67 | DEPENDS ${src} |
| 68 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} |
| 69 | COMMENT "Copying clang's ${f}...") |
| Douglas Gregor | bd82998 | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 70 | list(APPEND out_files ${dst}) |
| 71 | |
| 72 | if(other_output_dir) |
| 73 | set(other_dst ${other_output_dir}/${f}) |
| 74 | add_custom_command(OUTPUT ${other_dst} |
| 75 | DEPENDS ${src} |
| 76 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${other_dst} |
| 77 | COMMENT "Copying clang's ${f}...") |
| 78 | list(APPEND out_files ${other_dst}) |
| 79 | endif() |
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 80 | endforeach( f ) |
| 81 | |
| Douglas Gregor | bd82998 | 2010-10-11 23:17:59 +0000 | [diff] [blame] | 82 | add_custom_command(OUTPUT ${output_dir}/arm_neon.h |
| 83 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc |
| 84 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${output_dir}/arm_neon.h |
| 85 | COMMENT "Copying clang's arm_neon.h...") |
| 86 | list(APPEND out_files ${output_dir}/arm_neon.h) |
| 87 | |
| 88 | if (other_output_dir) |
| 89 | set(other_dst ${other_output_dir}/arm_neon.h) |
| 90 | add_custom_command(OUTPUT ${other_dst} |
| 91 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc |
| 92 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${other_dst} |
| 93 | COMMENT "Copying clang's arm_neon.h...") |
| 94 | list(APPEND out_files ${other_dst}) |
| 95 | endif () |
| 96 | |
| 97 | add_custom_target(clang-headers ALL DEPENDS ${out_files}) |
| Oscar Fuentes | 15fe190 | 2011-02-20 22:06:44 +0000 | [diff] [blame] | 98 | set_target_properties(clang-headers PROPERTIES FOLDER "Misc") |
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 99 | |
| Argyrios Kyrtzidis | 4168648 | 2013-03-29 21:51:40 +0000 | [diff] [blame] | 100 | if (other_output_dir) |
| Ted Kremenek | 80655be | 2013-08-28 05:38:43 +0000 | [diff] [blame] | 101 | if(UNIX) |
| 102 | add_custom_command(TARGET clang-headers POST_BUILD |
| 103 | COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}" |
| 104 | COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib/clang" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/clang") |
| 105 | endif() |
| Argyrios Kyrtzidis | 4168648 | 2013-03-29 21:51:40 +0000 | [diff] [blame] | 106 | endif () |
| 107 | |
| Douglas Gregor | 1f1be08 | 2010-05-28 04:22:06 +0000 | [diff] [blame] | 108 | install(FILES ${files} ${output_dir}/arm_neon.h |
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 109 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
| Oscar Fuentes | 843c828 | 2009-10-27 21:15:21 +0000 | [diff] [blame] | 110 | DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) |