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 3
3
# Distributed under the Boost Software License, Version 1.0.
4
4
# See http://www.boost.org/LICENSE_1_0.txt
5
5
6
+ import platform
7
+
6
8
from . import autoconfig
7
9
8
10
from pygccxml import parser
@@ -22,7 +24,12 @@ def test_map_gcc5():
22
24
"""
23
25
24
26
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"
26
33
27
34
decls = parser .parse (TEST_FILES , config )
28
35
global_ns = declarations .get_global_namespace (decls )
Original file line number Diff line number Diff line change 4
4
# See http://www.boost.org/LICENSE_1_0.txt
5
5
6
6
import pytest
7
+ import platform
7
8
8
9
from . import autoconfig
9
10
20
21
def global_ns ():
21
22
COMPILATION_MODE = parser .COMPILATION_MODE .ALL_AT_ONCE
22
23
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"
24
30
decls = parser .parse (TEST_FILES , config , COMPILATION_MODE )
25
31
global_ns = declarations .get_global_namespace (decls )
26
32
global_ns .init_optimizer ()
Original file line number Diff line number Diff line change 4
4
# See http://www.boost.org/LICENSE_1_0.txt
5
5
6
6
import pytest
7
+ import platform
7
8
8
9
from . import autoconfig
9
10
20
21
def global_ns ():
21
22
COMPILATION_MODE = parser .COMPILATION_MODE .ALL_AT_ONCE
22
23
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"
24
30
decls = parser .parse (TEST_FILES , config , COMPILATION_MODE )
25
31
global_ns = declarations .get_global_namespace (decls )
26
32
global_ns .init_optimizer ()
You can’t perform that action at this time.
0 commit comments