Skip to content

Commit eecd7ff

Browse files
authored
Merge pull request #249 from cortex-command-community/meson-pch-fix
Fix meson pch options
2 parents 2906eb8 + 481cb0d commit eecd7ff

File tree

4 files changed

+4
-24
lines changed

4 files changed

+4
-24
lines changed

.github/workflows/meson.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
CC: "ccache gcc"
101101
CXX: "ccache g++"
102102
run: |
103-
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
103+
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false -Db_pch=false build
104104
105105
- name: Configure for AppImage
106106
if: ${{inputs.upload_artefacts}}
@@ -201,7 +201,7 @@ jobs:
201201
env:
202202
LDFLAGS: "-static-libgcc -static-libstdc++"
203203
run: |
204-
meson setup --cross-file=${{steps.osxcross.outputs.meson-osxcross}} --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
204+
meson setup --cross-file=${{steps.osxcross.outputs.meson-osxcross}} --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false -Db_pch=false build
205205
206206
- name: Configure for App Bundle
207207
if: ${{inputs.upload_artefacts}}
@@ -262,7 +262,7 @@ jobs:
262262
263263
- name: Setup
264264
run: |
265-
meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} --vsenv build
265+
meson setup -Db_pch=false --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} --vsenv build
266266
267267
- name: Build
268268
run: |

Source/meson.build

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
2-
if use_pch
3-
pch = meson.current_source_dir()/'System/StandardIncludes.h'
4-
else
5-
pch = ''
6-
endif
1+
pch = meson.current_source_dir()/'System/StandardIncludes.h'
72
sources = []
83
source_libs = []
94
source_inc_dirs += [include_directories(

meson.build

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@ if get_option('debug') and get_option('b_lto')
2626
warning('Link time optimization enabled in debug mode, debug symbols may not be fully available. Disable b_lto with "meson configure -Db_lto=false".')
2727
endif
2828

29-
use_pch = get_option('use_pch').enabled()
30-
31-
if get_option('use_pch').auto()
32-
ccache = find_program('ccache', required : false)
33-
if ccache.found()
34-
message('Detected ccache, disabling precompiled headers')
35-
use_pch = false
36-
else
37-
message('Using precompiled headers')
38-
use_pch = true
39-
endif
40-
endif
41-
4229
if compiler.get_argument_syntax()== 'gcc' # used for gcc compatible compilers
4330
# Build against system libraries on linux
4431
message('gcc detected')

meson_options.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ option('tracy_enable', type: 'boolean', value: true, description: 'Enable Tracy
1616
option('tracy_callstack', type : 'integer', value : 0, description : 'Enfore callstack collection for tracy regions')
1717
option('tracy_on_demand', type : 'boolean', value : true, description : 'On-demand profiling')
1818
option('tracy_debuginfod', type : 'boolean', value : false, description : 'Enable debuginfod support')
19-
20-
option('use_pch', type : 'feature', value : 'auto')

0 commit comments

Comments
 (0)