Permalink
Browse files

be a bit more portable

  • Loading branch information...
1 parent 2c0ee90 commit 5d39954f88c1d4b6740a4b8ea8ac6e1ec4ff6f35 @simonmar committed Mar 30, 2013
Showing with 28 additions and 10 deletions.
  1. +28 −10 parconc-examples.cabal
@@ -12,6 +12,22 @@ build-type: Simple
cabal-version: >=1.10
-- -----------------------------------------------------------------------------
+-- Flags
+
+-- -f llvm: enable -fllvm to GHC; requires LLVM to be installed, but
+-- makes the Repa programs faster
+
+flag llvm
+ default: False
+
+-- -f devil: Enable the image-maniputation programs, which are
+-- disabled by default because they require the devil library which
+-- needs to be installed separately.
+
+flag devil
+ default: False
+
+-- -----------------------------------------------------------------------------
-- par-eval
executable sudoku1
@@ -207,30 +223,32 @@ executable fwdense
main-is: fwdense.hs
build-depends: base >= 4.5 && < 4.7
, repa == 3.2.*
- ghc-options: -O2 -fllvm
+ ghc-options: -O2
+ if flag(llvm)
+ ghc-options: -fllvm
default-language: Haskell2010
executable fwdense1
main-is: fwdense1.hs
build-depends: base >= 4.5 && < 4.7
, repa == 3.2.*
, transformers ==0.3.*
- ghc-options: -O2 -fllvm
+ ghc-options: -O2
+ if flag(llvm)
+ ghc-options: -fllvm
default-language: Haskell2010
--- Disable the image-maniputation programs by default, because they
--- require the devil library which needs to be installed separately.
-flag devil
- default: False
-
executable rotateimage
main-is: rotateimage.hs
build-depends: base >= 4.5 && < 4.7
, repa == 3.2.*
- , repa-devil == 0.3.*
- ghc-options: -O2 -fllvm
- if !flag(devil)
+ ghc-options: -O2
+ if flag(devil)
+ build-depends: repa-devil == 0.3.*
+ else
buildable: False
+ if flag(llvm)
+ ghc-options: -fllvm
default-language: Haskell2010
-- -----------------------------------------------------------------------------

0 comments on commit 5d39954

Please sign in to comment.