import Data.Maybe
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.PreProcess

main :: IO ()
main = defaultMainWithHooks hooks
  { hookedPreProcessors = hscDropCpp11 $ hookedPreProcessors hooks
  }
  where
    hooks = simpleUserHooks

    -- gcc shows a warning if -std=c++11 is used when compiling a C file, but
    -- clang is more strict and considers that an error, so we need to filter it
    -- out.