From dab5937eee30fbed34a6f5859ed326c4df8b1e94 Mon Sep 17 00:00:00 2001 From: Axis Sivitz Date: Tue, 30 Aug 2022 14:57:08 -0400 Subject: [PATCH] Fix compilation on MacOS / GHC 8.10.7 (#156) Fixes errors along the lines of: dear-imgui > [ 2 of 17] Compiling DearImGui.GLFW dear-imgui > error: unknown type name 'constexpr' So the "-std=c++11" option is not being passed to the C++ compiler on MacOS. The issue seems related to https://github.com/haskell/cabal/issues/6421 --- dear-imgui.cabal | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dear-imgui.cabal b/dear-imgui.cabal index 963693e..1db7fe6 100644 --- a/dear-imgui.cabal +++ b/dear-imgui.cabal @@ -185,6 +185,10 @@ library , vector , text + if os(darwin) + ghc-options: + -optcxx-std=c++11 + if flag(disable-obsolete) cxx-options: -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS