macro(add_test_sources VAR)
    file(GLOB TESTS_TMP . *-test.cc *-test.cu)
    set(${VAR} ${${VAR}} ${TESTS_TMP} PARENT_SCOPE)
    set(${VAR} ${${VAR}} ${TESTS_TMP} )
endmacro(add_test_sources)

macro(add_bench_sources VAR)
    file(GLOB BENCH_TMP . *-bench.cc *-bench.cu)
    set(${VAR} ${${VAR}} ${BENCH_TMP} PARENT_SCOPE)
    set(${VAR} ${${VAR}} ${BENCH_TMP} )
endmacro(add_bench_sources)

macro(add_sources VAR)
    file(GLOB SOURCES_TMP . *.cc *.cu)
    file(GLOB BENCH_TMP . *-bench.cc *-bench.cu)
    file(GLOB TESTS_TMP . *-test.cc *-test.cu)
    remove(SOURCES_TMP ${TESTS_TMP} ${BENCH_TMP})
    set(${VAR} ${${VAR}} ${SOURCES_TMP} PARENT_SCOPE)
    set(${VAR} ${${VAR}} ${SOURCES_TMP})
endmacro(add_sources)

macro(add_headers VAR)
    file(GLOB HEADERS_TMP . *.h)
    set(${VAR} ${${VAR}} ${HEADERS_TMP} PARENT_SCOPE)
    set(${VAR} ${${VAR}} ${HEADERS_TMP})
endmacro(add_headers)