<commit_before>
file(GLOB_RECURSE _extern_headers
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     *.h *.cuh *.hpp)

# cereal should get its headers installed a separate way, so find and
# remove those from _extern_headers
file(GLOB_RECURSE _cereal_headers
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/cereal
     cereal/include/*.h cereal/include/*.cuh cereal/include/*.hpp)

list(REMOVE_ITEM _extern_headers ${_cereal_headers})

# copy python modules to the build directory to make it a working python package
MACRO(copy_header file)
    add_custom_command (
        OUTPUT ${file}
        POST_BUILD
        COMMAND    ${CMAKE_COMMAND}
        ARGS       -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/../include/hoomd/extern/${file}
        COMMENT    "Copy hoomd/include/hoomd/extern/${file}"
    )
ENDMACRO(copy_header)

foreach(file ${_extern_headers})
    # copy headers into build directory
    copy_header(${file})
    # install into installation target
    get_filename_component(dir ${file} DIRECTORY)
    install(FILES ${file} DESTINATION ${PYTHON_MODULE_BASE_DIR}/include/hoomd/extern/${dir})
endforeach()

# copy python modules to the build directory to make it a working python package
MACRO(copy_cereal_header file)
    add_custom_command (
        OUTPUT include/${file}
        POST_BUILD
        COMMAND    ${CMAKE_COMMAND}
        ARGS       -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cereal/${file} ${CMAKE_CURRENT_BINARY_DIR}/../${file}
        COMMENT    "Copy hoomd/${file}"
    )
ENDMACRO(copy_cereal_header)


foreach(file ${_cereal_headers})
    # copy headers into build directory
    copy_cereal_header(${file})
    # install into installation target
    get_filename_component(dir ${file} DIRECTORY)
    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cereal/${file} DESTINATION ${PYTHON_MODULE_BASE_DIR}/${dir})
    list(APPEND _cereal_installed_headers include/${file})
endforeach()

add_custom_target(copy_extern ALL DEPENDS ${_extern_headers} ${_cereal_installed_headers})<commit_msg>reenable support for CMake 2.8.x<commit_after>
file(GLOB_RECURSE _extern_headers
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     *.h *.cuh *.hpp)

# cereal should get its headers installed a separate way, so find and
# remove those from _extern_headers
file(GLOB_RECURSE _cereal_headers
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/cereal
     cereal/include/*.h cereal/include/*.cuh cereal/include/*.hpp)

list(REMOVE_ITEM _extern_headers ${_cereal_headers})

# copy python modules to the build directory to make it a working python package
MACRO(copy_header file)
    add_custom_command (
        OUTPUT ${file}
        POST_BUILD
        COMMAND    ${CMAKE_COMMAND}
        ARGS       -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/../include/hoomd/extern/${file}
        COMMENT    "Copy hoomd/include/hoomd/extern/${file}"
    )
ENDMACRO(copy_header)

foreach(file ${_extern_headers})
    # copy headers into build directory
    copy_header(${file})
    # install into installation target
    if (CMAKE_MAJOR_VERSION VERSION_GREATER 2)
    get_filename_component(dir ${file} DIRECTORY)
    else()
    get_filename_component(dir ${file} PATH)
    endif()
    install(FILES ${file} DESTINATION ${PYTHON_MODULE_BASE_DIR}/include/hoomd/extern/${dir})
endforeach()

# copy python modules to the build directory to make it a working python package
MACRO(copy_cereal_header file)
    add_custom_command (
        OUTPUT include/${file}
        POST_BUILD
        COMMAND    ${CMAKE_COMMAND}
        ARGS       -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cereal/${file} ${CMAKE_CURRENT_BINARY_DIR}/../${file}
        COMMENT    "Copy hoomd/${file}"
    )
ENDMACRO(copy_cereal_header)


foreach(file ${_cereal_headers})
    # copy headers into build directory
    copy_cereal_header(${file})
    # install into installation target
    if (CMAKE_MAJOR_VERSION VERSION_GREATER 2)
    get_filename_component(dir ${file} DIRECTORY)
    else()
    get_filename_component(dir ${file} PATH)
    endif()
    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cereal/${file} DESTINATION ${PYTHON_MODULE_BASE_DIR}/${dir})
    list(APPEND _cereal_installed_headers include/${file})
endforeach()

add_custom_target(copy_extern ALL DEPENDS ${_extern_headers} ${_cereal_installed_headers})
{'fraction_non_alphanumeric': 0.1013717740060451, 'fraction_numerical': 0.0009300162752848175, 'mean_word_length': 4.139784946236559, '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': '6785778', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1372, 'n_words': 309}