Skip to content

Commit 7eaf9f3

Browse files
committed
draft (don't merge): add "permissive" option to ci matrix
1 parent 5e46304 commit 7eaf9f3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ jobs:
112112
type:
113113
- "debug"
114114
- "release"
115+
permissive:
116+
- false
117+
- true
115118

116119
runs-on: windows-2022
117120

@@ -130,7 +133,7 @@ jobs:
130133
- uses: ilammy/msvc-dev-cmd@v1
131134

132135
- name: Configure Meson
133-
run: meson setup build --vsenv --buildtype=${{ matrix.type }} -Ddevel=true -Db_lto=false
136+
run: meson setup build --vsenv --buildtype=${{ matrix.type }} -Ddevel=true -Db_lto=false -Dpermissive=${{ matrix.permissive }}
134137

135138
- name: Build
136139
run: meson compile -C build

meson.build

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ project(
1919
'b_ndebug=if-release',
2020
# compiler options
2121
'cpp_std=c++17'
22+
'permissive=false'
2223
]
2324
)
2425

@@ -36,6 +37,7 @@ is_devel = get_option('devel')
3637
is_debug = get_option('debug')
3738
is_release = not is_debug
3839
is_pedantic = get_option('pedantic') or is_devel
40+
is_permissive = get_option('permissive')
3941
is_windows = host_machine.system() == 'windows'
4042
is_x64 = host_machine.cpu_family() == 'x86_64'
4143
is_subproject = meson.is_subproject()
@@ -75,7 +77,6 @@ global_args = cpp.get_supported_arguments(
7577
'/Gy', # function-level linking
7678
'/GF', # string pooling
7779
'/openmp-',
78-
'/permissive-',
7980
'/utf-8',
8081
'/volatile:iso',
8182
'/Zc:__cplusplus',
@@ -88,6 +89,11 @@ if has_exceptions
8889
else
8990
global_args += cpp.get_supported_arguments('-D_HAS_EXCEPTIONS=0')
9091
endif
92+
if is_permissive
93+
global_args += cpp.get_supported_arguments('/permissive') # TODO '-DTOML_DISABLE_CONDITIONAL_NOEXCEPT_LAMBDA=1')
94+
else
95+
global_args += cpp.get_supported_arguments('/permissive-')
96+
endif
9197
if is_pedantic
9298
global_args += cpp.get_supported_arguments(
9399
# clang

0 commit comments

Comments
 (0)