Skip to content

Commit f80f0b1

Browse files
committed
cabal: build-apps flag
1 parent 1e0ea5c commit f80f0b1

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

cabal.project.local.ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flags: +build-apps

network-can.cabal

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ extra-source-files:
1919
extra-doc-files:
2020
CHANGELOG.md
2121

22+
flag build-apps
23+
default:
24+
False
25+
description:
26+
Build example applications
27+
2228
library
2329
ghc-options: -Wall
2430
hs-source-dirs: src
@@ -64,6 +70,8 @@ test-suite pure
6470
default-language: Haskell2010
6571

6672
executable hcandump
73+
if !flag(build-apps)
74+
buildable: False
6775
build-depends: base >=4.7 && <5
6876
, network-can
6977
default-language: Haskell2010
@@ -72,19 +80,22 @@ executable hcandump
7280
ghc-options: -Wall -threaded -rtsopts "-with-rtsopts -N"
7381

7482
executable hcanbridge
83+
if !flag(build-apps)
84+
buildable: False
7585
build-depends: base >=4.7 && <5
7686
, network-can
7787
, data-default-class
7888
, mtl
7989
, serialport >= 0.5.5
8090
, unliftio
81-
8291
default-language: Haskell2010
8392
main-is: CANBridge.hs
8493
hs-source-dirs: app
8594
ghc-options: -Wall -threaded -rtsopts "-with-rtsopts -N"
8695

8796
executable hslcanserial
97+
if !flag(build-apps)
98+
buildable: False
8899
build-depends: base >=4.7 && <5
89100
, network-can
90101
, data-default-class
@@ -95,6 +106,8 @@ executable hslcanserial
95106
ghc-options: -Wall -threaded -rtsopts "-with-rtsopts -N"
96107

97108
executable hslcanudp
109+
if !flag(build-apps)
110+
buildable: False
98111
build-depends: base >=4.7 && <5
99112
, network
100113
, network-can

0 commit comments

Comments
 (0)