Add flag to postgrest.cabal to disable collecting coverage data
This commit is contained in:
committed by
Wolfgang Walther
parent
56a7bc5030
commit
94b516d074
+25
-17
@@ -24,6 +24,11 @@ flag dev
|
||||
manual: True
|
||||
description: Development flags
|
||||
|
||||
flag hpc
|
||||
default: True
|
||||
manual: True
|
||||
description: Enable HPC (dev only)
|
||||
|
||||
library
|
||||
default-language: Haskell2010
|
||||
default-extensions: OverloadedStrings
|
||||
@@ -92,18 +97,20 @@ library
|
||||
, wai-extra >= 3.0.19 && < 3.2
|
||||
, wai-logger >= 2.3.2
|
||||
, wai-middleware-static >= 0.8.1 && < 0.10
|
||||
-- -fno-spec-constr may help keep compile time memory use in check,
|
||||
-- see https://gitlab.haskell.org/ghc/ghc/issues/16017#note_219304
|
||||
-- -optP-Wno-nonportable-include-path
|
||||
-- prevents build failures on case-insensitive filesystems (macos),
|
||||
-- see https://github.com/commercialhaskell/stack/issues/3918
|
||||
ghc-options: -Werror -Wall -fwarn-identities
|
||||
-fno-spec-constr -optP-Wno-nonportable-include-path
|
||||
|
||||
if flag(dev)
|
||||
ghc-options: -O0 -Werror -Wall -fwarn-identities
|
||||
-fno-spec-constr -optP-Wno-nonportable-include-path
|
||||
-fhpc -hpcdir .hpc
|
||||
ghc-options: -O0
|
||||
if flag(hpc)
|
||||
ghc-options: -fhpc -hpcdir .hpc
|
||||
else
|
||||
ghc-options: -O2 -Werror -Wall -fwarn-identities
|
||||
-fno-spec-constr -optP-Wno-nonportable-include-path
|
||||
-- -fno-spec-constr may help keep compile time memory use in check,
|
||||
-- see https://gitlab.haskell.org/ghc/ghc/issues/16017#note_219304
|
||||
-- -optP-Wno-nonportable-include-path
|
||||
-- prevents build failures on case-insensitive filesystems (macos),
|
||||
-- see https://github.com/commercialhaskell/stack/issues/3918
|
||||
ghc-options: -O2
|
||||
|
||||
executable postgrest
|
||||
default-language: Haskell2010
|
||||
@@ -131,16 +138,17 @@ executable postgrest
|
||||
, time >= 1.6 && < 1.11
|
||||
, wai >= 3.2.1 && < 3.3
|
||||
, warp >= 3.2.12 && < 3.4
|
||||
if flag(dev)
|
||||
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -I2"
|
||||
-O0 -Werror -Wall -fwarn-identities
|
||||
-fno-spec-constr -optP-Wno-nonportable-include-path
|
||||
-fhpc -hpcdir .hpc
|
||||
else
|
||||
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -I2"
|
||||
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -I2"
|
||||
-O2 -Werror -Wall -fwarn-identities
|
||||
-fno-spec-constr -optP-Wno-nonportable-include-path
|
||||
|
||||
if flag(dev)
|
||||
ghc-options: -O0
|
||||
if flag(hpc)
|
||||
ghc-options: -fhpc -hpcdir .hpc
|
||||
else
|
||||
ghc-options: -O2
|
||||
|
||||
if !os(windows)
|
||||
build-depends: unix
|
||||
other-modules: UnixSocket
|
||||
|
||||
Reference in New Issue
Block a user