Skip to content

Commit

Permalink
Make cpython compilation work on powershell.
Browse files Browse the repository at this point in the history
Powershell uses ; as a command-separator, so the way the msbuild targets joins the list with those ';' would make it interpret the next target as the next command instead.

done as part of CURA-11622
  • Loading branch information
rburema committed Sep 4, 2024
1 parent a3fb99a commit 0dde82a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions recipes/cpython/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,10 @@ def _msvc_build(self):

sln = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln")
# FIXME: Solution files do not pick up the toolset automatically.
cmd = msbuild.command(sln, targets=projects)
self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}")
for project in projects:
# To make this work in Powershell too (which uses ';' as command seperation), do each project separately.
cmd = msbuild.command(sln, targets=[project])
self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}")

def build(self):
self._patch_sources()
Expand Down

0 comments on commit 0dde82a

Please sign in to comment.