[gjs/master.msvc] meson.build: Use PCH for Visual Studio builds



commit 85d635bd4f1947ed41ff6f31cd6ab9b06a02979d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jul 12 12:18:51 2021 +0800

    meson.build: Use PCH for Visual Studio builds
    
    We can actually have precompiled header work if we remove the line
    `cpp_pch: ...` in the `libgjs` target definition.
    
    So, go back to not using PCH for g++ with Meson pre-0.59.0.

 meson.build | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/meson.build b/meson.build
index b866bfeb..e96deef4 100644
--- a/meson.build
+++ b/meson.build
@@ -495,11 +495,9 @@ if host_machine.system() == 'windows'
 endif
 
 pch_headers = ['gjs/gjs_pch.hh']
-if get_option('b_pch')
-    if (cxx.get_id() == 'gcc' and not \
-        meson.version().version_compare('>= 0.59.0')) or \
-        cxx.get_id() == 'msvc'
-        warning('Precompiled headers not supported with g++ and meson versions earlier than 0.59.0, nor with 
Visual Studio')
+if get_option('b_pch') and cxx.get_id() == 'gcc'
+    if not meson.version().version_compare('>= 0.59.0')
+        warning('Precompiled headers not supported with g++ and meson versions earlier than 0.59.0')
         pch_headers = []
     endif
 endif
@@ -545,7 +543,6 @@ link_args += cxx.get_supported_link_arguments([
 
 libgjs = shared_library(meson.project_name(),
     sources: [ libgjs_private_sources, module_resource_srcs ],
-    cpp_pch: pch_headers,
     link_args: link_args, link_depends: [symbol_map, symbol_list],
     link_whole: libgjs_internal,
     dependencies: base_build_dep,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]