diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96786ea..1ff555d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: runner: windows-latest } # Earliest supported and latest nim - nim: [1.6.18, "stable"] + nim: [2.2.12, "stable"] name: ${{ matrix.platform.icon }} ${{ matrix.platform.label }} - Nim v${{ matrix.nim }} runs-on: ${{ matrix.platform.runner }} defaults: diff --git a/leopard/wrapper.nim b/leopard/wrapper.nim index c0e7ee6..f8cad04 100644 --- a/leopard/wrapper.nim +++ b/leopard/wrapper.nim @@ -104,6 +104,11 @@ const LeopardExtraLinkerFlags {.strdefine.} = "" + # CMake would otherwise take the first compiler on PATH, e.g. MSVC from vcvars. + leopardCmakeCompilers = + when defined(gcc): "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++" + else: "" + static: if buildOS == "windows": func pathUnix2Win(path: string): string = @@ -125,8 +130,8 @@ static: if (bashEx("ls", LeopardLib.pathWin2Unix)).exitCode != 0: discard bash("mkdir -p", buildDirUnix) let cmd = - @["cd", buildDirUnix, "&& cmake", leopardDirUnix, LeopardCmakeFlags, - "&& make libleopard"] + @["cd", buildDirUnix, "&& cmake", leopardDirUnix, leopardCmakeCompilers, + LeopardCmakeFlags, "&& make libleopard"] echo "\nBuilding Leopard-RS: " & cmd.join(" ") let (output, exitCode) = bashEx cmd echo output