Skip to content

Commit 67caadc

Browse files
committed
Added flag for window-example-paths
1 parent a363b66 commit 67caadc

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ packages: .
22
tests: True
33

44
package jbeam-edit
5-
flags: +dump-ast +transformation
5+
flags: +dump-ast +transformation -windows-example-paths

cabal.project.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ package *
88
-with-rtsopts=-N
99

1010
package jbeam-edit
11-
flags: -dump-ast -transformation
11+
flags: -dump-ast -transformation +windows-example-paths

jbeam-edit.cabal

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ flag transformation
4040
default: False
4141
manual: True
4242

43+
flag windows-example-paths
44+
description:
45+
Use executable-relative example paths (for Windows release builds)
46+
47+
default: False
48+
manual: True
49+
4350
library
4451
exposed-modules:
4552
CommandLineOptions
@@ -82,7 +89,7 @@ library
8289
exposed-modules: Transformation
8390
hs-source-dirs: src-extra/transformation
8491

85-
if os(windows)
92+
if (os(windows) && flag(windows-example-paths))
8693
cpp-options: -DWINDOWS_EXAMPLE_PATHS
8794

8895
executable jbeam-edit

package.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ library:
4242
- condition: flag(transformation)
4343
source-dirs: [src-extra/transformation]
4444
exposed-modules: [Transformation]
45-
- condition: os(mingw32)
45+
- condition: os(windows) && flag(windows-example-paths)
4646
cpp-options: -DWINDOWS_EXAMPLE_PATHS
4747

4848
flags:
@@ -54,6 +54,11 @@ flags:
5454
description: Enable transformation (experimental)
5555
manual: true
5656
default: false
57+
windows-example-paths:
58+
description: Use executable-relative example paths (for Windows release builds)
59+
default: false
60+
manual: true
61+
5762

5863
executables:
5964
jbeam-edit:

stack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ flags:
55
jbeam-edit:
66
transformation: false
77
dump-ast: false
8+
windows-example-paths: false

0 commit comments

Comments
 (0)