From c8e06176657afde2170bfd0800f56df6bf9d7981 Mon Sep 17 00:00:00 2001
From: Spencer Janssen <sjanssen@cse.unl.edu>
Date: Sat, 19 Jan 2008 10:12:15 +0100
Subject: Roll testing into the main executable, use Cabal to build the tests

darcs-hash:20080119091215-a5988-8f5f48e8c40a0f39abdf6ffe4d4dc938ab8c7ef1.gz
---
 xmonad.cabal | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'xmonad.cabal')

diff --git a/xmonad.cabal b/xmonad.cabal
index d727cf1..addd56f 100644
--- a/xmonad.cabal
+++ b/xmonad.cabal
@@ -23,11 +23,11 @@ extra-source-files: README TODO CONFIG STYLE tests/loc.hs tests/Properties.hs
 cabal-version:      >= 1.2
 
 flag small_base
-  description: Choose the new smaller, split-up base package.
+    description: Choose the new smaller, split-up base package.
 
 flag testing
-  description: Testing mode, only build minimal components
-  default: False
+    description: Testing mode, only build minimal components
+    default: False
 
 library
     exposed-modules:    XMonad
@@ -48,6 +48,7 @@ library
     ghc-options:        -funbox-strict-fields -Wall -optl-Wl,-s
     ghc-prof-options:   -prof -auto-all
     extensions:         CPP
+
     if flag(testing)
         buildable: False
 
@@ -59,5 +60,11 @@ executable xmonad
     ghc-options:        -funbox-strict-fields -Wall -optl-Wl,-s
     ghc-prof-options:   -prof -auto-all
     extensions:         CPP
+
     if flag(testing)
-        ghc-options: -Werror
+        cpp-options:    -DTESTING
+        hs-source-dirs: . tests/
+        build-depends:  QuickCheck
+        ghc-options:    -Werror
+    if flag(testing) && flag(small_base)
+        build-depends:  random
-- 
cgit v1.2.3