[swift-users] #if DEBUG on Linux

TUNG CK cktung at mac.com
Sun Aug 20 22:50:10 CDT 2017


https://stackoverflow.com/questions/24003291/ifdef-replacement-in-the-swift-language

see the duscussion 

> Taylor Swift via swift-users <swift-users at swift.org> 
> #if DEBUG
>     print("debug")
> #endif
> 
> Doesn’t work on Linux, I think only XCode sets this. How can I conditionally include code that only runs in debug mode on Linux?
> 
> I know about `_isDebugAssertConfiguration()` but using it produces warnings when building in release mode.
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170821/b7def3de/attachment.html>


More information about the swift-users mailing list