<commit_before>macro(cocl_build_objects target_name target_type)
    set(shared)
    set(excludefromall)
    set(filenames)
    foreach(arg ${ARGN})
        if(${arg} STREQUAL SHARED)
            set(shared SHARED)
        elseif(${arg} STREQUAL EXCLUDE_FROM_ALL)
            set(excludefromall EXCLUDE_FROM_ALL)
        else()
            set(filenames ${filenames} ${arg})
        endif()
    endforeach()

    set(OBJECTS)
    foreach(filename ${filenames})
        get_filename_component(EXT ${filename} EXT)
        string(REPLACE / _ FILENAME_NO_SLASH ${filename})
        if(${EXT} STREQUAL .cu)
            # for the bit with angle brackets, see https://cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)
            # it's because we dot actually know the include directories yet, at the time of executing the contents of this macro
            # note that, despite what that page may claim, generator expressions cannot contain spaces, eg see:
            # http://cmake.3232098.n2.nabble.com/Custom-Commands-Generator-Expressions-tp7586630p7586631.html
            # (finding this bit about whitespace cost me a world of pain...)
                    #"$<$<BOOL:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>>:$<JOIN:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>,;>>"
                    # "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>"
            add_custom_command(
                OUTPUT ${target_name}.d/${filename}.o
                COMMAND
                    ${COCL_PATH}
                    --clang-home ${CLANG_HOME}
                    "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:$<JOIN:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>,;-I>>"
                    ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
                    -o ${target_name}.d/${filename}.o
                    -c
                DEPENDS ${filename}
                VERBATIM
            )
            add_custom_target(build_${target_name}_${FILENAME_NO_SLASH}_o
                DEPENDS ${target}.d/${filename}.o
            )
            set(OBJECTS ${OBJECTS} ${target_name}.d/${filename}.o)
        else()
            set(OBJECTS ${OBJECTS} ${filename})
        endif()<commit_msg>fixes for build eigen on u1604<commit_after>macro(cocl_build_objects target_name target_type)
    set(shared)
    set(excludefromall)
    set(filenames)
    foreach(arg ${ARGN})
        if(${arg} STREQUAL SHARED)
            set(shared SHARED)
        elseif(${arg} STREQUAL EXCLUDE_FROM_ALL)
            set(excludefromall EXCLUDE_FROM_ALL)
        else()
            set(filenames ${filenames} ${arg})
        endif()
    endforeach()

    set(OBJECTS)
    foreach(filename ${filenames})
        get_filename_component(EXT ${filename} EXT)
        string(REPLACE / _ FILENAME_NO_SLASH ${filename})
        if(${EXT} STREQUAL .cu)
            # for the bit with angle brackets, see https://cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)
            # it's because we dot actually know the include directories yet, at the time of executing the contents of this macro
            # note that, despite what that page may claim, generator expressions cannot contain spaces, eg see:
            # http://cmake.3232098.n2.nabble.com/Custom-Commands-Generator-Expressions-tp7586630p7586631.html
            # (finding this bit about whitespace cost me a world of pain...)
                    #"$<$<BOOL:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>>:$<JOIN:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>,;>>"
                    # "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>"
                    # "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:$<JOIN:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>,;-I>>"
            add_custom_command(
                OUTPUT ${target_name}.d/${filename}.o
                COMMAND
                    ${COCL_PATH}
                    --clang-home ${CLANG_HOME}
                    "$<$<BOOL:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>>:$<JOIN:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>,;>>;"
                    "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:$<JOIN:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>,;-I>>"
                    ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
                    -o ${target_name}.d/${filename}.o
                    -c
                DEPENDS ${filename}
                VERBATIM
            )
            add_custom_target(build_${target_name}_${FILENAME_NO_SLASH}_o
                DEPENDS ${target}.d/${filename}.o
            )
            set(OBJECTS ${OBJECTS} ${target_name}.d/${filename}.o)
        else()
            set(OBJECTS ${OBJECTS} ${filename})
        endif()
{'fraction_non_alphanumeric': 0.13293172690763053, 'fraction_numerical': 0.011244979919678716, 'mean_word_length': 2.480782669461915, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 2, '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': '6775236', 'n_tokens_mistral': 1613, 'n_tokens_neox': 1516, 'n_words': 246}