File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 33# Distributed under the Boost Software License, Version 1.0.
44# See http://www.boost.org/LICENSE_1_0.txt
55
6+ import platform
7+
68from . import autoconfig
79
810from pygccxml import parser
@@ -22,7 +24,12 @@ def test_map_gcc5():
2224 """
2325
2426 config = autoconfig .cxx_parsers_cfg .config .clone ()
25- config .cflags = "-std=c++11"
27+ if platform .system () == "Darwin" :
28+ config .cflags = "-std=c++11 -Dat_quick_exit=atexit -Dquick_exit=exit"
29+ # https://fr.mathworks.com/matlabcentral/answers/2013982-clibgen-generatelibrarydefinition-error-the-global-scope-has-no-quick_exit-on-mac-m2#answer_1439856
30+ # https://github.com/jetbrains/kotlin/commit/d50f585911dedec5723213da8835707ac95e1c01
31+ else :
32+ config .cflags = "-std=c++11"
2633
2734 decls = parser .parse (TEST_FILES , config )
2835 global_ns = declarations .get_global_namespace (decls )
Original file line number Diff line number Diff line change 44# See http://www.boost.org/LICENSE_1_0.txt
55
66import pytest
7+ import platform
78
89from . import autoconfig
910
2021def global_ns ():
2122 COMPILATION_MODE = parser .COMPILATION_MODE .ALL_AT_ONCE
2223 config = autoconfig .cxx_parsers_cfg .config .clone ()
23- config .cflags = "-std=c++11"
24+ if platform .system () == "Darwin" :
25+ config .cflags = "-std=c++11 -Dat_quick_exit=atexit -Dquick_exit=exit"
26+ # https://fr.mathworks.com/matlabcentral/answers/2013982-clibgen-generatelibrarydefinition-error-the-global-scope-has-no-quick_exit-on-mac-m2#answer_1439856
27+ # https://github.com/jetbrains/kotlin/commit/d50f585911dedec5723213da8835707ac95e1c01
28+ else :
29+ config .cflags = "-std=c++11"
2430 decls = parser .parse (TEST_FILES , config , COMPILATION_MODE )
2531 global_ns = declarations .get_global_namespace (decls )
2632 global_ns .init_optimizer ()
Original file line number Diff line number Diff line change 44# See http://www.boost.org/LICENSE_1_0.txt
55
66import pytest
7+ import platform
78
89from . import autoconfig
910
2021def global_ns ():
2122 COMPILATION_MODE = parser .COMPILATION_MODE .ALL_AT_ONCE
2223 config = autoconfig .cxx_parsers_cfg .config .clone ()
23- config .cflags = "-std=c++11"
24+ if platform .system () == "Darwin" :
25+ config .cflags = "-std=c++11 -Dat_quick_exit=atexit -Dquick_exit=exit"
26+ # https://fr.mathworks.com/matlabcentral/answers/2013982-clibgen-generatelibrarydefinition-error-the-global-scope-has-no-quick_exit-on-mac-m2#answer_1439856
27+ # https://github.com/jetbrains/kotlin/commit/d50f585911dedec5723213da8835707ac95e1c01
28+ else :
29+ config .cflags = "-std=c++11"
2430 decls = parser .parse (TEST_FILES , config , COMPILATION_MODE )
2531 global_ns = declarations .get_global_namespace (decls )
2632 global_ns .init_optimizer ()
You can’t perform that action at this time.
0 commit comments