Skip to content

Commit

Permalink
Do not warn on -O2 if flag conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
ffaf1 committed Aug 23, 2022
1 parent 7b07857 commit a40cdf6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# cabal check
No errors or warnings could be found in the package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Test.Cabal.Prelude

-- Do not output warning when an -O2 is behind a cabal flag.
main = cabalTest $ cabal "check" []
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cabal-version: 2.2
name: pkg
version: 0
category: example
maintainer: none@example.com
synopsis: synopsys
description: description
license: GPL-3.0-or-later

flag force-O2
default: False
manual: True

library
exposed-modules: Foo
default-language: Haskell2010
if flag(force-O2)
ghc-options: -O2

0 comments on commit a40cdf6

Please sign in to comment.