git.iko.soy/typeable/http-api-data
on master help sign in
Add cppOptions
commit8cc39ea3676c2277ae7e8d384462e3ce58355987 authorOleg Grenrus <oleg.grenrus@iki.fi> dateFri 13 Jan 2017, 19:15 (10 years ago) parentf15e04e
2 files changed+5−7
Setup.lhs+4−2 test/DocTest.hsc+1−5
Setup.lhs+4−2
@@ -62,11 +62,13 @@ generateBuildModule flags pkg lbi = do
6262 let includeArgs = map ("-I"++) $ includeDirs libBI
6363
6464 -- CPP includes, i.e. include cabal_macros.h
65− let cppFlags = [ "-optP-include", "-optP" ++ libAutogenDir ++ "/cabal_macros.h" ]
65+ let cppFlags = map ("-optP"++) $
66+ [ "-include", libAutogenDir ++ "/cabal_macros.h" ]
67+ ++ cppOptions libBI
6668
6769 -- Actually we need to check whether testName suite == "doctests"
6870 -- 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
7072
7173 -- get and create autogen dir
7274#if MIN_VERSION_Cabal(1,25,0)
test/DocTest.hsc+1−5
@@ -55,8 +55,4 @@ main = withUnicode $ do
5555 traverse_ putStrLn args
5656 doctest args
5757 where
58− args =
59−#ifdef TRUSTWORTHY
60− "-DTRUSTWORTHY=1" :
61−#endif
62− flags ++ pkgs ++ module_sources
58+ args = flags ++ pkgs ++ module_sources