vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Implement STDIN support when running cmake or scripts

Open KoenVda88 opened this issue 3 years ago • 4 comments

FetchContent with ssh key

Hi, I'm using a the FetchContent_Declare to clone in some code. This code I access using ssh and git. If I simply run cmake CMakeLists.txt the terminal will ask for my passphrase to download the content. But if I click build in VSCode there is nothing happening at the moment it should ask for the passphrase. It is just stuck forever.

Platform and Versions

  • Operating System: Kali Linux in WSL2
  • CMake Version: 3.18.4
  • VSCode Version: 1.57.1
  • CMake Tools Extension Version: 1.7.3
  • Compiler/Toolchain: x86_64-linux-gnu-gcc-10

Thanks!

KoenVda88 avatar Jul 05 '21 20:07 KoenVda88

@KoenVda88, thank you for opening this report. CMake Tools currently is not able to interact with stdin in general when executables or scripts are launched during various extension operations. We are interested in improving this user scenario but we may not be able to address this immediately. We will also monitor the reactions from the community (upvotes of the first GitHub issue entry) to find how this best fits in our backlog.

andreeis avatar Jul 07 '21 18:07 andreeis

Thanks Andreeis!

I will keep a look for this.

You know any workaround for now?

KoenVda88 avatar Jul 08 '21 06:07 KoenVda88

Either keep using the terminal or, if the build command line is too complicated to remember and copy-paste, try to write a build task that would invoke the same command the regular main build command does. Tasks are spawned in the terminal so maybe the input interaction will work there. I didn't try this yet. Let me know if you need help writing the build task.

andreeis avatar Jul 08 '21 07:07 andreeis

I have a CMake script that prompts for SVN credentials on "command": "configure" kind of task and I came across this limitation too. I would love to see stdin support in CMake Tools extension.

MartinsSmirnovs avatar Aug 25 '22 16:08 MartinsSmirnovs