How to use a powershell script as environment file for toolchains?

Answered

I really like the ability to add an environment file (script) to the toolchain that calculates the necessary environment variables for the system and sets them accordingly. Unfortunately, it is not currently possible to add a powershell script, as it seems that the file is only called from a command line under Windows (perhaps with the `call` command?).

Since batch files are a bit old fashioned and I would like to use powershell capabilities for my environment files as well, how is it possible to add a powershell script as a toolchain environment file?

Using a batch file to call a Powershell file won't work because a child process can't set environment variables for its parent.

0
1 comment

Hello!

Thank you for the post. I created a feature request - https://youtrack.jetbrains.com/issue/CPP-34199. Feel free to comment or upvote the issue in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

0

Please sign in to leave a comment.