<commit_before>set(sources DarwinShims.h FoundationShims.h GlobalObjects.h HeapObject.h RefCount.h RuntimeShims.h UnicodeShims.h module.map)
set(output_dir "${SWIFTLIB_DIR}/shims")

set(commands)
set(outputs)
foreach(input ${sources})
  list(APPEND outputs "${output_dir}/${input}")
  list(APPEND commands
    COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${input}"
    "${output_dir}/${input}")
endforeach()

add_custom_command(OUTPUT ${outputs}
  COMMAND ${CMAKE_COMMAND} -E make_directory "${output_dir}"
  ${commands}
  DEPENDS ${sources}
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
  COMMENT "Copying SwiftShims module to ${output_dir}"
  )

add_custom_target(
  copy_shim_headers
  DEPENDS ${outputs}
  SOURCES ${sources}
  )

# Symlink in the Clang headers.
add_custom_command(TARGET copy_shim_headers POST_BUILD
  COMMAND ${CMAKE_COMMAND} -E create_symlink
    "${SWIFT_PATH_TO_CLANG_BUILD}/${CMAKE_CFG_INTDIR}/lib/clang"
    "${SWIFTLIB_DIR}/clang"<commit_msg>Revert "[CMake] Remove shims/ folder as an explicit output of copy_shim_headers."<commit_after>set(sources DarwinShims.h FoundationShims.h GlobalObjects.h HeapObject.h RefCount.h RuntimeShims.h UnicodeShims.h module.map)
set(output_dir "${SWIFTLIB_DIR}/shims")

set(commands)
set(outputs)
foreach(input ${sources})
  list(APPEND outputs "${output_dir}/${input}")
  list(APPEND commands
    COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${input}"
    "${output_dir}/${input}")
endforeach()

add_custom_command(OUTPUT "${output_dir}" ${outputs}
  COMMAND ${CMAKE_COMMAND} -E make_directory "${output_dir}"
  ${commands}
  DEPENDS ${sources}
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
  COMMENT "Copying SwiftShims module to ${output_dir}"
  )

add_custom_target(
  copy_shim_headers
  DEPENDS "${output_dir}" ${outputs}
  SOURCES ${sources}
  )

# Symlink in the Clang headers.
add_custom_command(TARGET copy_shim_headers POST_BUILD
  COMMAND ${CMAKE_COMMAND} -E create_symlink
    "${SWIFT_PATH_TO_CLANG_BUILD}/${CMAKE_CFG_INTDIR}/lib/clang"
    "${SWIFTLIB_DIR}/clang"
{'fraction_non_alphanumeric': 0.13132295719844359, 'fraction_numerical': 0.0, 'mean_word_length': 6.372759856630824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7220197', 'n_tokens_mistral': 742, 'n_tokens_neox': 731, 'n_words': 141}