| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 1 | set(files | 
| Douglas Gregor | e183993 | 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 | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 16 |  | 
| Douglas Gregor | e183993 | 2009-06-07 07:09:23 +0000 | [diff] [blame] | 17 | #FIXME: Centralize Clang version info | 
| Douglas Gregor | 274a6b4 | 2009-06-16 20:13:51 +0000 | [diff] [blame] | 18 | if (MSVC_IDE OR XCODE) | 
|  | 19 | set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/1.0/include) | 
|  | 20 | else () | 
|  | 21 | set(output_dir ${LLVM_BINARY_DIR}/lib/clang/1.0/include) | 
|  | 22 | endif () | 
|  | 23 |  | 
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 24 |  | 
|  | 25 | foreach( f ${files} ) | 
|  | 26 | set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) | 
|  | 27 | set( dst ${output_dir}/${f} ) | 
|  | 28 | add_custom_command(OUTPUT ${dst} | 
|  | 29 | DEPENDS ${src} | 
|  | 30 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} | 
|  | 31 | COMMENT "Copying clang's ${f}...") | 
|  | 32 | endforeach( f ) | 
|  | 33 |  | 
| Douglas Gregor | 9b5f9cd | 2009-06-25 05:07:31 +0000 | [diff] [blame] | 34 | add_custom_target(clang-headers ALL | 
| Oscar Fuentes | 07d9f9a | 2008-10-26 00:56:18 +0000 | [diff] [blame] | 35 | DEPENDS ${files}) | 
|  | 36 |  | 
|  | 37 | install(FILES ${files} | 
|  | 38 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | 
|  | 39 | DESTINATION Headers) |