[gjs/master.msvc: 4/4] build: Disable PCH on Visual Studio as well




commit c998b7de0b2c19ffff12bbe68255035e88abeb85
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jul 7 18:02:15 2021 +0800

    build: Disable PCH on Visual Studio as well
    
    It seems that the support in Meson for precompiled headers for Visual
    Studio is broken as well (build fails with a linker error where
    gjs_pch.obj cannot be found), so disable PCH on Visual Studio until a
    future Meson release fixes this issue.

 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 49e825d9..3f5e887a 100644
--- a/meson.build
+++ b/meson.build
@@ -497,9 +497,11 @@ if host_machine.system() == 'windows'
 endif
 
 pch_headers = ['gjs/gjs_pch.hh']
-if get_option('b_pch') and not meson.version().version_compare('>= 0.58.1')
-    if cxx.get_id() == 'gcc'
-        warning('Precompiled headers not supported with g++ and meson versions earlier than 0.58.1')
+if get_option('b_pch')
+    if (cxx.get_id() == 'gcc' and not \
+        meson.version().version_compare('>= 0.58.1')) or \
+        cxx.get_id() == 'msvc'
+        warning('Precompiled headers not supported with g++ and meson versions earlier than 0.58.1, nor with 
Visual Studio')
         pch_headers = []
     endif
 endif


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