diff options
Diffstat (limited to 'lib/Headers/CMakeLists.txt')
-rw-r--r-- | lib/Headers/CMakeLists.txt | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt index 2da1a28aca42..edee7d764250 100644 --- a/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt @@ -1,6 +1,7 @@ set(files altivec.h ammintrin.h + arm_acle.h avxintrin.h avx2intrin.h bmiintrin.h @@ -10,6 +11,7 @@ set(files float.h fma4intrin.h fmaintrin.h + ia32intrin.h immintrin.h iso646.h Intrin.h @@ -44,20 +46,13 @@ set(files xopintrin.h cpuid.h unwind.h - module.map + module.modulemap ) -set(output_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/clang/${CLANG_VERSION}/include) - -# If we are in an IDE that has a configuration directory, we need to -# create a second copy of the headers so that 'clang' can find them if -# it's run from the build directory. -if(MSVC_IDE OR XCODE) - set(other_output_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib/clang/${CLANG_VERSION}/include) -endif() +set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) # Generate arm_neon.h -clang_tablegen(arm_neon.h.inc -gen-arm-neon +clang_tablegen(arm_neon.h -gen-arm-neon SOURCE ${CLANG_SOURCE_DIR}/include/clang/Basic/arm_neon.td) set(out_files) @@ -69,43 +64,18 @@ foreach( f ${files} ) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} COMMENT "Copying clang's ${f}...") list(APPEND out_files ${dst}) - - if(other_output_dir) - set(other_dst ${other_output_dir}/${f}) - add_custom_command(OUTPUT ${other_dst} - DEPENDS ${src} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${other_dst} - COMMENT "Copying clang's ${f}...") - list(APPEND out_files ${other_dst}) - endif() endforeach( f ) add_custom_command(OUTPUT ${output_dir}/arm_neon.h - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${output_dir}/arm_neon.h + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h ${output_dir}/arm_neon.h COMMENT "Copying clang's arm_neon.h...") list(APPEND out_files ${output_dir}/arm_neon.h) -if (other_output_dir) - set(other_dst ${other_output_dir}/arm_neon.h) - add_custom_command(OUTPUT ${other_dst} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h.inc ${other_dst} - COMMENT "Copying clang's arm_neon.h...") - list(APPEND out_files ${other_dst}) -endif () - add_custom_target(clang-headers ALL DEPENDS ${out_files}) set_target_properties(clang-headers PROPERTIES FOLDER "Misc") -if (other_output_dir) - if(UNIX) - add_custom_command(TARGET clang-headers POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}" - COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib/clang" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/clang") - endif() -endif () - -install(FILES ${files} ${output_dir}/arm_neon.h +install( + FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) |