From 87a56f050073f4ff5737f8535cf476c326d85f27 Mon Sep 17 00:00:00 2001 From: Guang1234567 Date: Wed, 18 Aug 2021 19:24:44 +0800 Subject: [PATCH] [IDE] Make breakpoint works in debug mode with CLion. --- Package.swift | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/Package.swift b/Package.swift index f81b361..639bf3a 100644 --- a/Package.swift +++ b/Package.swift @@ -3,21 +3,27 @@ import PackageDescription let package = Package( - name: "SwiftCheck", - products: [ - .library( - name: "SwiftCheck", - targets: ["SwiftCheck"]), - ], - dependencies: [ - .package(url: "https://github.com/llvm-swift/FileCheck.git", from: "0.1.0") - ], - targets: [ - .target( - name: "SwiftCheck"), - .testTarget( - name: "SwiftCheckTests", - dependencies: ["SwiftCheck", "FileCheck"]), - ] + name: "SwiftCheck", + products: [ + .library( + name: "SwiftCheck", + targets: ["SwiftCheck"]), + ], + dependencies: [ + .package(url: "https://github.com/llvm-swift/FileCheck.git", from: "0.1.0"), + ], + targets: [ + .target( + name: "SwiftCheck"), + .testTarget( + name: "SwiftCheckTests", + dependencies: ["SwiftCheck", "FileCheck", ], + linkerSettings: [ + .unsafeFlags(["-Xlinker", "-rpath", + "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib"], + .when(platforms: [.macOS]) + ), + ]), + ] )