(cabal check) Add "Version signatures" test
[cabal.git] / cabal-testsuite / PackageTests / Regression / T5309 / T5309.cabal
blob4f2ec422696ea3c1ac48f8f268815a7126ac00fc
1 cabal-version:      2.2
2 category:           Example
3 build-type:         Simple
5 name:               T5309
6 version:            1.0.0.0
8 author:             Alex Washburn
9 maintainer:         github@recursion.ninja
10 copyright:          2018 Alex Washburn (recursion.ninja)
11                     
12 synopsis:           A binding to a C++ hashtable for thread-safe memoization.
14 description:        This package is designed to provide a "minimal working example"
15                     to test the cxx-sources and the cxx-options buildinfo flags.
16                     The code was pulled out PCG, https://github.com/amnh/pcg
19 common ffi-build-info
21   -- We must provide the full relative path to every C file that the project depends on.
22   c-sources:        memoized-tcm/costMatrixWrapper.c
23                     memoized-tcm/dynamicCharacterOperations.c
25   cc-options:       --std=c11
26                      
27   cxx-sources:      memoized-tcm/costMatrix.cpp
29   cxx-options:      --std=c++11
31   default-language: Haskell2010
33   -- This library is required for the C++ standard template library.
34   extra-libraries:  stdc++
36   -- Here we list all directories that contain C header files that the FFI tools will need
37   -- to locate when preprocessing the C files. Without listing the directories containing
38   -- the C header files here, the FFI preprocession (hsc2hs, c2hs,etc.) will fail to locate
39   -- the requisite files.
40   -- Note also, that the parent directory of the necessary C header files must be specified.
41   -- The preprocesser will not recursively look in subdirectories for C header files!
42   include-dirs:     memoized-tcm
45 common language-spec
47   build-depends:    base       >=4.5.1
48 --                  , lens
49        
50   default-language: Haskell2010
52   ghc-options:      -O2 -Wall
54                     
55 common lib-build-info
57   hs-source-dirs:   lib
59   -- Modules exported by the library.
60   other-modules:    Bio.Character.Exportable.Class
61                     Data.TCM.Memoized
62                     Data.TCM.Memoized.FFI
64                     
65 library
67   import:           ffi-build-info
68                   , language-spec
70   -- Modules exported by the library.
71   exposed-modules:  Bio.Character.Exportable.Class
72                     Data.TCM.Memoized
73                     Data.TCM.Memoized.FFI
75   hs-source-dirs:   lib
76                     
78 executable exe-no-lib
80   import:           ffi-build-info
81                   , language-spec
82                   , lib-build-info
84   main-is:          Main.hs
86   hs-source-dirs:   app
89 executable exe-with-lib
91   import:           language-spec
93   main-is:          Main.hs
95   build-depends:    T5309
97   hs-source-dirs:   app
100 benchmark bench-no-lib
102   import:           ffi-build-info
103                   , language-spec
104                   , lib-build-info
106   main-is:          Main.hs
108   type:             exitcode-stdio-1.0
109                      
110   hs-source-dirs:   app
113 benchmark bench-with-lib
115   import:           language-spec
117   main-is:          Main.hs
119   type:             exitcode-stdio-1.0
121   build-depends:    T5309
123   hs-source-dirs:   app
126 test-suite test-no-lib
128   import:           ffi-build-info
129                   , language-spec
130                   , lib-build-info
132   main-is:          Main.hs
134   type:             exitcode-stdio-1.0
135                      
136   hs-source-dirs:   app
139 test-suite test-with-lib
141   import:           language-spec
143   main-is:          Main.hs
145   type:             exitcode-stdio-1.0
146   
147   build-depends:    T5309
148                      
149   hs-source-dirs:   app