Add flag to postgrest.cabal to disable collecting coverage data

This commit is contained in:
Wolfgang Walther
2021-01-02 13:51:00 +01:00
committed by Wolfgang Walther
parent 56a7bc5030
commit 94b516d074
+25 -17
View File
@@ -24,6 +24,11 @@ flag dev
manual: True manual: True
description: Development flags description: Development flags
flag hpc
default: True
manual: True
description: Enable HPC (dev only)
library library
default-language: Haskell2010 default-language: Haskell2010
default-extensions: OverloadedStrings default-extensions: OverloadedStrings
@@ -92,18 +97,20 @@ library
, wai-extra >= 3.0.19 && < 3.2 , wai-extra >= 3.0.19 && < 3.2
, wai-logger >= 2.3.2 , wai-logger >= 2.3.2
, wai-middleware-static >= 0.8.1 && < 0.10 , 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) if flag(dev)
ghc-options: -O0 -Werror -Wall -fwarn-identities ghc-options: -O0
-fno-spec-constr -optP-Wno-nonportable-include-path if flag(hpc)
-fhpc -hpcdir .hpc ghc-options: -fhpc -hpcdir .hpc
else else
ghc-options: -O2 -Werror -Wall -fwarn-identities ghc-options: -O2
-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
executable postgrest executable postgrest
default-language: Haskell2010 default-language: Haskell2010
@@ -131,16 +138,17 @@ executable postgrest
, time >= 1.6 && < 1.11 , time >= 1.6 && < 1.11
, wai >= 3.2.1 && < 3.3 , wai >= 3.2.1 && < 3.3
, warp >= 3.2.12 && < 3.4 , warp >= 3.2.12 && < 3.4
if flag(dev) ghc-options: -threaded -rtsopts "-with-rtsopts=-N -I2"
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"
-O2 -Werror -Wall -fwarn-identities -O2 -Werror -Wall -fwarn-identities
-fno-spec-constr -optP-Wno-nonportable-include-path -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) if !os(windows)
build-depends: unix build-depends: unix
other-modules: UnixSocket other-modules: UnixSocket