From 558616b7dcc8955ab08fe8b194cdd5e128aba3f4 Mon Sep 17 00:00:00 2001 From: Sam T Date: Fri, 7 Jun 2013 01:09:37 +0400 Subject: ~ Use testing flag to hide internals. We need some internal functions in tests and benchmarks, so it's better to just use CPP for this. --- bittorrent.cabal | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bittorrent.cabal') diff --git a/bittorrent.cabal b/bittorrent.cabal index e3d98e84..138f5d3b 100644 --- a/bittorrent.cabal +++ b/bittorrent.cabal @@ -24,6 +24,9 @@ source-repository head type: git location: git://github.com/pxqr/bittorrent.git +flag testing + description: Expose debug stuff in export declarations. + default: False library exposed-modules: Data.Torrent @@ -79,9 +82,12 @@ library extensions: PatternGuards hs-source-dirs: src + if flag(testing) + cpp-options: -DTESTING ghc-options: -Wall + test-suite info-hash type: exitcode-stdio-1.0 main-is: info-hash.hs @@ -96,6 +102,9 @@ test-suite info-hash ghc-options: -Wall + if !flag(testing) + buildable: False + test-suite properties @@ -119,6 +128,9 @@ test-suite properties ghc-options: -Wall -fno-warn-orphans + if !flag(testing) + buildable: False + benchmark benchmarks @@ -137,3 +149,6 @@ benchmark benchmarks , bittorrent ghc-options: -O2 -Wall -fno-warn-orphans + + if !flag(testing) + buildable: False \ No newline at end of file -- cgit v1.2.3