Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 1 | set(files |
Douglas Gregor | 0602600 | 2009-06-07 07:09:23 +0000 | [diff] [blame] | 2 | emmintrin.h |
| 3 | float.h |
| 4 | iso646.h |
| 5 | limits.h |
| 6 | mm_malloc.h |
| 7 | mmintrin.h |
| 8 | pmmintrin.h |
| 9 | stdarg.h |
| 10 | stdbool.h |
| 11 | stddef.h |
| 12 | stdint.h |
| 13 | tgmath.h |
| 14 | tmmintrin.h |
| 15 | xmmintrin.h) |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 16 | |
Douglas Gregor | ebfc180 | 2009-06-16 20:13:51 +0000 | [diff] [blame] | 17 | if (MSVC_IDE OR XCODE) |
Douglas Gregor | 7f7b748 | 2009-08-23 05:28:29 +0000 | [diff] [blame] | 18 | set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include) |
Douglas Gregor | ebfc180 | 2009-06-16 20:13:51 +0000 | [diff] [blame] | 19 | else () |
Douglas Gregor | 7f7b748 | 2009-08-23 05:28:29 +0000 | [diff] [blame] | 20 | set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) |
Douglas Gregor | ebfc180 | 2009-06-16 20:13:51 +0000 | [diff] [blame] | 21 | endif () |
| 22 | |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 23 | |
| 24 | foreach( f ${files} ) |
| 25 | set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) |
| 26 | set( dst ${output_dir}/${f} ) |
| 27 | add_custom_command(OUTPUT ${dst} |
| 28 | DEPENDS ${src} |
| 29 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} |
| 30 | COMMENT "Copying clang's ${f}...") |
| 31 | endforeach( f ) |
| 32 | |
Douglas Gregor | 91a425c | 2009-06-25 05:07:31 +0000 | [diff] [blame] | 33 | add_custom_target(clang-headers ALL |
Oscar Fuentes | d2f4e5e | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 34 | DEPENDS ${files}) |
| 35 | |
| 36 | install(FILES ${files} |
| 37 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
Oscar Fuentes | 25950e8 | 2009-10-27 21:15:21 +0000 | [diff] [blame] | 38 | DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) |