From 7fdf5ff81ea4c4fb95ec26a82cf353692cbb231d Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 15 May 2018 00:28:51 +0800 Subject: fix precompiled header for rules --- tests/projects/wdk/kmdf/msdsm/xmake.lua | 6 ++++++ xmake/actions/build/kinds/object.lua | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/projects/wdk/kmdf/msdsm/xmake.lua b/tests/projects/wdk/kmdf/msdsm/xmake.lua index 65a861fc1..0e11a85e4 100644 --- a/tests/projects/wdk/kmdf/msdsm/xmake.lua +++ b/tests/projects/wdk/kmdf/msdsm/xmake.lua @@ -19,3 +19,9 @@ target("msdsm") -- add file msdsm.mof and modify default wdk.mof.header for this file add_files("msdsm.mof", {values = {wdk_mof_header = "msdsmwmi.h"}}) + -- set precompiled header + set_pcheader("precomp.h") + + -- add links + add_links("mpio") + diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua index 24a8a33b6..8e56cd6a2 100644 --- a/xmake/actions/build/kinds/object.lua +++ b/xmake/actions/build/kinds/object.lua @@ -297,9 +297,6 @@ function build(target, buildinfo) ccache = find_ccache() end - -- build precompiled headers - _build_pcheaderfiles(target, buildinfo) - -- build source batches with custom rules before building other sources for sourcekind, sourcebatch in pairs(target:sourcebatches()) do if sourcebatch.rulename then @@ -307,6 +304,9 @@ function build(target, buildinfo) end end + -- build precompiled headers + _build_pcheaderfiles(target, buildinfo) + -- build source batches for sourcekind, sourcebatch in pairs(target:sourcebatches()) do -- cgit v1.3.1