From 005dc146023a62124669046557272490bcd85d8f Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Wed, 26 Apr 2023 08:33:15 +0200 Subject: [PATCH] Link libm on Linux (#11) * Link libm on linux * Update Linux CI --- .github/workflows/ci-linux.yml | 8 +++++--- Package.swift | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index af32842..dd55375 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -17,8 +17,10 @@ jobs: image: swift:${{ matrix.swift }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v3.5.2 + - name: Test - run: make test + run: swift test -Xcxx -Wno-modules-import-nested-redundant -Xcxx -Wno-return-type-c-linkage -Xcc -Wno-modules-import-nested-redundant -Xcc -Wno-return-type-c-linkage + - name: Build Release - run: make build-release + run: swift build -c release -Xcxx -Wno-modules-import-nested-redundant -Xcxx -Wno-return-type-c-linkage -Xcc -Wno-modules-import-nested-redundant -Xcc -Wno-return-type-c-linkage diff --git a/Package.swift b/Package.swift index c9053ec..f5dcf6b 100644 --- a/Package.swift +++ b/Package.swift @@ -11,7 +11,8 @@ var package = Package( .target(name: "CImGui", path: "Sources/CImGui", cSettings: [.define("CIMGUI_DEFINE_ENUMS_AND_STRUCTS")], - cxxSettings: [.define("CIMGUI_DEFINE_ENUMS_AND_STRUCTS")]), + cxxSettings: [.define("CIMGUI_DEFINE_ENUMS_AND_STRUCTS")], + linkerSettings: [.linkedLibrary("m", .when(platforms: [.linux]))]), .target(name: "AutoWrapper", resources: [ .copy("Assets/definitions.json")