From 2a540a1603b785ed1d19271ccc552d6e67857511 Mon Sep 17 00:00:00 2001
From: Jarod42 <Jarod42@users.noreply.github.com>
Date: Mon, 11 Dec 2023 12:24:07 +0100
Subject: [PATCH] Handle `buildaction "None"`.

---
 ninja.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ninja.lua b/ninja.lua
index f183085..4649bad 100644
--- a/ninja.lua
+++ b/ninja.lua
@@ -475,7 +475,9 @@ local function compile_file_build(cfg, filecfg, toolset, pch_dependency, regular
 	local filepath = project.getrelative(cfg.workspace, filecfg.abspath)
 	local has_custom_settings = fileconfig.hasFileSettings(filecfg)
 
-	if shouldcompileasc(filecfg) then
+	if filecfg.buildaction == "None" then
+		return
+	elseif shouldcompileasc(filecfg) then
 		local objfilename = obj_dir .. "/" .. filecfg.objname .. (toolset.objectextension or ".o")
 		objfiles[#objfiles + 1] = objfilename
 		local cflags = {}