function(multiple_cppfiles_one_executable EXEC_PREFIX INCLUDE_DIRS LINK_LIBS)
    FILE(GLOB CUFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cu)
    FILE(GLOB CPPFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
	get_filename_component(DIRNAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
	set(EXECUTABLE_NAME ${EXEC_PREFIX}${DIRNAME})
	add_executable(${EXECUTABLE_NAME} ${CUFILES} ${CPPFILES})
	set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
	foreach(INCLUDE_DIR ${INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/lib/include)
	    target_include_directories(${EXECUTABLE_NAME} PUBLIC ${INCLUDE_DIR})
    endforeach()
	foreach(LINK_LIB ${LINK_LIBS})
	    target_link_libraries(${EXECUTABLE_NAME} ${LINK_LIB})
	endforeach()
endfunction()
