CCurl available only for Linux or macOS#304
Conversation
CCurl dependencies append only for Linux or Mac
djones6
left a comment
There was a problem hiding this comment.
@makleso6 Apologies for the delay in reviewing your PR. Other than my suggestion on the #if syntax this change looks fine to me.
We'll want to document the KITURA_IOS flag somewhere - could you add a mention of it to the README, perhaps a new heading called 'Optional compilation flags'?
|
|
||
|
|
||
|
|
||
| #if os(Linux) || os(macOS) |
There was a problem hiding this comment.
I think I'd prefer us to test on the KITURA_IOS flag as it's then consistent with the conditions for the CCurl dependency in Package.swift, eg:
#if !KITURA_IOS| return HTTPServer() | ||
| } | ||
|
|
||
| #if os(Linux) || os(macOS) |
|
@djones6 I'll try it |
|
@djones6 D you think that the removal ClientRequest in !KITURA_IOS good practice? |
|
The Kitura and Kitura-net tests are heavily dependent on You could potentially look at using Kitura-NIO instead: Kitura-NIO uses Swift-NIO and doesn't depend on Curl. To use it, set |
|
|
CCurl available only for Linux or macOS. I Use Kitura on iOS platform, so I move CCurl in other scope
Description
Create flag KITURA_IOS
for Linux or macOS ClientRequest available(no need use CCurl on iOS )
for Linux or macOS HTTP methods available(no need use CCurl on iOS )
Motivation and Context
Use Kitura WebServer on iOS platform without magic
How Has This Been Tested?
I think tests no needed
Checklist: