git.iko.soy/typeable/http-api-data
on master help sign in
Add cppOptions
8cc39eaOleg Grenrus
Setup.lhs+4−2
@@ -62,11 +62,13 @@ generateBuildModule flags pkg lbi = do
62 let includeArgs = map ("-I"++) $ includeDirs libBI
62 let includeArgs = map ("-I"++) $ includeDirs libBI
63
63
64 -- CPP includes, i.e. include cabal_macros.h
64 -- CPP includes, i.e. include cabal_macros.h
65+ let cppFlags = map ("-optP"++) $
65− let cppFlags = [ "-optP-include", "-optP" ++ libAutogenDir ++ "/cabal_macros.h" ]
66+ [ "-include", libAutogenDir ++ "/cabal_macros.h" ]
67+ ++ cppOptions libBI
66
68
67 -- Actually we need to check whether testName suite == "doctests"
69 -- Actually we need to check whether testName suite == "doctests"
68 -- pending https://github.com/haskell/cabal/pull/4229 getting into GHC HEAD tree
70 -- pending https://github.com/haskell/cabal/pull/4229 getting into GHC HEAD tree
69− withTestLBI pkg lbi $ \suite suitecfg -> when (testName suite == testName suite) $ do
71+ withTestLBI pkg lbi $ \suite suitecfg -> when (testName suite == "doctests") $ do
70
72
71 -- get and create autogen dir
73 -- get and create autogen dir
72#if MIN_VERSION_Cabal(1,25,0)
74#if MIN_VERSION_Cabal(1,25,0)
test/DocTest.hsc+1−5
@@ -55,8 +55,4 @@ main = withUnicode $ do
55 traverse_ putStrLn args
55 traverse_ putStrLn args
56 doctest args
56 doctest args
57 where
57 where
58− args =
59−#ifdef TRUSTWORTHY
60− "-DTRUSTWORTHY=1" :
61−#endif
62− flags ++ pkgs ++ module_sources
58+ args = flags ++ pkgs ++ module_sources