| |
| |
| |
| |
| |
|
|
| foreach(thrust_target IN LISTS THRUST_TARGETS) |
| thrust_get_target_property(config_host ${thrust_target} HOST) |
| thrust_get_target_property(config_device ${thrust_target} DEVICE) |
| thrust_get_target_property(config_prefix ${thrust_target} PREFIX) |
|
|
| string(TOLOWER "${config_host}" host_lower) |
| string(TOLOWER "${config_device}" device_lower) |
|
|
| |
| set(headers_globs thrust/*.h) |
| set(headers_exclude_systems_globs thrust/system/*/*) |
| set(headers_systems_globs |
| thrust/system/${host_lower}/* |
| thrust/system/${device_lower}/* |
| ) |
| set(headers_exclude_details_globs |
| thrust/detail/* |
| thrust/*/detail/* |
| thrust/*/*/detail/* |
| ) |
|
|
| |
| file(GLOB_RECURSE headers |
| RELATIVE "${Thrust_SOURCE_DIR}/thrust" |
| CONFIGURE_DEPENDS |
| ${headers_globs} |
| ) |
|
|
| |
| file(GLOB_RECURSE headers_exclude_systems |
| RELATIVE "${Thrust_SOURCE_DIR}/thrust" |
| CONFIGURE_DEPENDS |
| ${headers_exclude_systems_globs} |
| ) |
| list(REMOVE_ITEM headers ${headers_exclude_systems}) |
|
|
| |
| file(GLOB_RECURSE headers_systems |
| RELATIVE ${Thrust_SOURCE_DIR}/thrust |
| CONFIGURE_DEPENDS |
| ${headers_systems_globs} |
| ) |
| list(APPEND headers ${headers_systems}) |
|
|
| |
| file(GLOB_RECURSE headers_exclude_details |
| RELATIVE "${Thrust_SOURCE_DIR}/thrust" |
| CONFIGURE_DEPENDS |
| ${headers_exclude_details_globs} |
| ) |
| list(REMOVE_ITEM headers ${headers_exclude_details}) |
|
|
| |
| set(partially_implemented_CUDA |
| async/copy.h |
| async/for_each.h |
| async/reduce.h |
| async/sort.h |
| async/transform.h |
| event.h |
| future.h |
| ) |
|
|
| |
| set(partially_implemented_CPP |
| ) |
|
|
| |
| set(partially_implemented_TBB |
| ) |
|
|
| |
| set(partially_implemented_OMP |
| ) |
|
|
| |
| set(partially_implemented |
| ${partially_implemented_CUDA} |
| ${partially_implemented_CPP} |
| ${partially_implemented_TBB} |
| ${partially_implemented_OMP} |
| ) |
| list(REMOVE_DUPLICATES partially_implemented) |
|
|
| set(headertest_srcs) |
|
|
| foreach (header IN LISTS headers) |
| if ("${header}" IN_LIST partially_implemented) |
| |
| if (NOT "${header}" IN_LIST partially_implemented_${config_device}) |
| |
| continue() |
| endif() |
| endif() |
|
|
| set(headertest_src_ext .cpp) |
| if ("CUDA" STREQUAL "${config_device}") |
| set(headertest_src_ext .cu) |
| endif() |
|
|
| set(headertest_src "headers/${config_prefix}/${header}${headertest_src_ext}") |
| configure_file("${Thrust_SOURCE_DIR}/cmake/header_test.in" "${headertest_src}") |
|
|
| list(APPEND headertest_srcs "${headertest_src}") |
| endforeach() |
|
|
| set(headertest_target ${config_prefix}.headers) |
| add_library(${headertest_target} OBJECT ${headertest_srcs}) |
| target_link_libraries(${headertest_target} PUBLIC ${thrust_target}) |
| thrust_clone_target_properties(${headertest_target} ${thrust_target}) |
|
|
| add_dependencies(${config_prefix}.all ${headertest_target}) |
| endforeach() |
|
|