summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-01-04 22:38:06 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-01-04 22:38:06 +0400
commit9d691a89ba079805d2823a736ec50c0c2caaca5a (patch)
tree8032710b4eebd6326ec86cca9ab59bdc0287ff8e
parentac421efc3db225d3d965580286552541f51dbb68 (diff)
Add examples flag to cabal
-rw-r--r--bittorrent.cabal10
1 files changed, 9 insertions, 1 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal
index f1b2823f..41782605 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -35,6 +35,10 @@ source-repository this
35 branch: master 35 branch: master
36 tag: v0.0.0.3 36 tag: v0.0.0.3
37 37
38flag examples
39 description: Whether to build examples.
40 default: False
41
38library 42library
39 default-language: Haskell2010 43 default-language: Haskell2010
40 default-extensions: PatternGuards 44 default-extensions: PatternGuards
@@ -238,6 +242,8 @@ test-suite spec
238-- ghc-options: -O2 -Wall -fno-warn-orphans 242-- ghc-options: -O2 -Wall -fno-warn-orphans
239 243
240executable gettorrent 244executable gettorrent
245 if !flag(examples)
246 buildable: False
241 default-language: Haskell2010 247 default-language: Haskell2010
242 hs-source-dirs: examples 248 hs-source-dirs: examples
243 main-is: GetTorrent.hs 249 main-is: GetTorrent.hs
@@ -250,7 +256,9 @@ executable gettorrent
250 , filepath 256 , filepath
251 , bittorrent 257 , bittorrent
252 258
253executable client-example 259executable client
260 if !flag(examples)
261 buildable: False
254 default-language: Haskell2010 262 default-language: Haskell2010
255 hs-source-dirs: examples 263 hs-source-dirs: examples
256 main-is: Client.hs 264 main-is: Client.hs