Skip to content

Commit

Permalink
Add 'doctests' flag to toggle building doctests
Browse files Browse the repository at this point in the history
Enabled by default. This allows users to turn off doctests completely by
turning this flag off.

Signed-off-by: hololeap <[email protected]>
  • Loading branch information
hololeap committed Sep 30, 2023
1 parent b8eaf4b commit 2c8c127
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hackport.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ flag cabal-v1
manual: True
default: False

flag doctests
description: Build doctests
default: True
manual: True

flag gentoo-tests
description: Build tests that require a running Gentoo system
manual: True
Expand Down Expand Up @@ -1025,7 +1030,7 @@ test-suite doctests

other-modules: Paths_hackport

if !flag(cabal-v1)
if !flag(doctests) || !flag(cabal-v1)
buildable: False

test-suite doctests-v2
Expand All @@ -1042,7 +1047,7 @@ test-suite doctests-v2
-- cabal-install should already be installed if this is being built...
, doctest:doctest >=0.8

if flag(cabal-v1)
if !flag(doctests) || flag(cabal-v1)
buildable: False

test-suite spec
Expand Down

0 comments on commit 2c8c127

Please sign in to comment.