spmdm.cu should be just a symbolic link to spmdm.cpp, no need for a code duplication here. Simply

    rm spmdm.cu
    ln -s spmdm.cpp spmdm.cu

should do the trick.