Nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified

I’m trying to compile a project using CMake, and getting the error:

nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified

The CMake generated command is:

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\nvcc.exe" -
gencode=arch=compute_35,code=\"sm_35,compute_35\" -
gencode=arch=compute_50,code=\"sm_50,compute_50\" -
gencode=arch=compute_52,code=\"sm_52,compute_52\" -
gencode=arch=compute_60,code=\"sm_60,compute_60\" -
gencode=arch=compute_61,code=\"sm_61,compute_61\" -
gencode=arch=compute_70,code=\"sm_70,compute_70\" -
gencode=arch=compute_75,code=\"sm_75,compute_75\" -
gencode=arch=compute_80,code=\"sm_80,compute_80\" -
gencode=arch=compute_86,code=\"sm_86,compute_86\" -
gencode=arch=compute_86,code=\"compute_86,compute_86\" --use-local-env -
ccbin "C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64" -x cu   -
ID:\a\torch\torch\lantern\include -ID:\a\torch\torch\lantern\build\libtorch\include -
ID:\a\torch\torch\lantern\build\libtorch\include\torch\csrc\api\include -
I"C:\Program Files\NVIDIA Corporation\NvToolsExt\include" -I"C:\Program 
Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -I"C:\Program 
Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include"     --keep-dir x64\Release  
-maxrregcount=0  --machine 64 --compile -cudart static -Xcudafe --
diag_suppress=cc_clobber_ignored,--diag_suppress=integer_sign_change,--
diag_suppress=useless_using_declaration,--diag_suppress=set_but_not_used,--
diag_suppress=field_without_dll_interface,--
diag_suppress=base_class_has_different_dll_interface,--
diag_suppress=dll_interface_conflict_none_assumed,--
diag_suppress=dll_interface_conflict_dllexport_assumed,--
diag_suppress=implicit_return_from_non_void_function,--
diag_suppress=unsigned_compare_with_zero,--
diag_suppress=declared_but_not_referenced,--diag_suppress=bad_friend_decl --
Werror cross-execution-space-call --no-host-device-move-forward --expt-relaxed-
constexpr --expt-extended-lambda /permissive /permissive- -std=c++14 -
Xcompiler="/EHsc -Ob2"   -D_WINDOWS -DONNX_NAMESPACE=onnx_c2 -
DNDEBUG -DCUDA113 -DUSE_DISTRIBUTED -DUSE_C10D_GLOO -
D"CMAKE_INTDIR=\"Release\"" -Dlantern_EXPORTS -D_WINDLL -D_MBCS -
DWIN32 -D_WINDOWS -DNDEBUG -DNOMINMAX -DCUDA113 -DUSE_DISTRIBUTED 
-DUSE_C10D_GLOO -D"CMAKE_INTDIR=\"Release\"" -Dlantern_EXPORTS -
Xcompiler "/EHsc /W1 /nologo /O2 /Fdlantern.dir\Release\vc142.pdb /FS   /MD /GR" 
-o lantern.dir\Release\sort_vert_kernel.obj 
"D:\a\torch\torch\lantern\src\Contrib\SortVertices\sort_vert_kernel.cu"

I know this might be not enough information for a perfect solution. I wonder if someone could help me figure out if there’s something obviously wrong in this generated command so I can have a direction on where to debug further.

Thank you very much!