AmigaPorts / AmigaCMakeCrossToolchains

Mozilla Public License 2.0
11 stars 3 forks source link

Enforce forward slashes for toolchain path for better interop with VSCode #12

Closed timfel closed 1 year ago

timfel commented 1 year ago

With this change, this file works to use Bartman's compiler in VSCode in .vscode/cmake-kits.json

[
  // Sigh... the only reason we need two entries is because PATH on Windows needs ';' as separator, and on Unix it's ':' and there's no default substitution for this in VSCode
  {
    "name": "GCC Bartman m68k Win32",
    "toolchainFile": "${workspaceFolder}/deps/AmigaCMakeCrossToolchains/m68k-bartman.cmake",
    "environmentVariables": {
      "PATH": "${command:amiga.bin-path}/opt/bin;${command:amiga.bin-path};${command:amiga.bin-path}/opt/m68k-amiga-elf/bin;${env:PATH}"
    },
    "preferredGenerator": {
      "name": "Ninja"
    },
    "cmakeSettings": {
      "M68K_CPU": "68000",
      "TOOLCHAIN_PREFIX": "m68k-amiga-elf",
      "TOOLCHAIN_PATH": "${command:amiga.bin-path}/opt"
    },
    "keep": true
  },
  {
    "name": "GCC Bartman m68k Unix",
    "toolchainFile": "${workspaceFolder}/deps/AmigaCMakeCrossToolchains/m68k-bartman.cmake",
    "environmentVariables": {
      "PATH": "${command:amiga.bin-path}/opt/bin:${command:amiga.bin-path}:${command:amiga.bin-path}/opt/m68k-amiga-elf/bin:${env:PATH}"
    },
    "preferredGenerator": {
      "name": "Ninja"
    },
    "cmakeSettings": {
      "M68K_CPU": "68000",
      "TOOLCHAIN_PREFIX": "m68k-amiga-elf",
      "TOOLCHAIN_PATH": "${command:amiga.bin-path}/opt"
    },
    "keep": true
  }
]
tehKaiN commented 1 year ago

this needs an explanatory comment in .cmake file so that it won't be deleted in the future by someone looking at it and thinking it's pointless. Otherwise looks good!

timfel commented 1 year ago

this needs an explanatory comment in .cmake file so that it won't be deleted in the future by someone looking at it and thinking it's pointless. Otherwise looks good!

Done, hope it's clear enough :)