visual-studiocmdcudabuild-rules

Why does CUDA.rules have two identical command lines


The commandline for CUDA.rules file is:

echo [CompilerPath] [Keep] [CInterleavedPTX] [ExtraNvccOptions] [Arch] -ccbin "$(VCInstallDir)bin" [Emulation] [FastMath] [Defines] -Xcompiler "/EHsc [Warning] /nologo [Optimization] /Zi [RuntimeChecks] [Runtime] [TypeInfo] [ExtraCppOptions]" [Include] [MaxRegCount] [PtxAsOptionV] [NvccCompilation] "$(InputPath)"

[CompilerPath] [Keep] [CInterleavedPTX] [ExtraNvccOptions] [Arch] -ccbin "$(VCInstallDir)bin" [Emulation] [FastMath] [Defines] -Xcompiler "/EHsc [Warning] /nologo [Optimization] /Zi [RuntimeChecks] [Runtime] [TypeInfo] [ExtraCppOptions]" [Include] [MaxRegCount] [ptxasoptionv] [NvccCompilation] "$(InputPath)""

I have put in a line for clarity as it shows two command which are identical (as far as I can see), except the first one is preceded by "echo". Does anyone know what the purpose of this is?


Solution

  • The first only tells you what the command is going to be, the second actually performs the command.
    echo is the dos command that displays text:

    C:\>echo bla bla bla
    bla bla bla