From de2581ed0ce958177bf3ce875df5755c092ccbe4 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 7 Apr 2022 21:18:27 +0200 Subject: [PATCH] fix MinGW pre compiled headers leads to "internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:192: MapViewOfFileEx: Attempt to access invalid address" --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43533c14..a792c467 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,7 @@ option(ENABLE_RTTI "Enables RTTI" OFF) option(ENABLE_EXCEPTIONS "Enables Exceptions" OFF) option(ENABLE_OPT "Enables spirv-opt capability if present" ON) -if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") +if(MINGW OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")) # Workaround for CMake behavior on Mac OS with gcc, cmake generates -Xarch_* arguments # which gcc rejects option(ENABLE_PCH "Enables Precompiled header" OFF)