Skip to content

Commit 82a7ee8

Browse files
committed
Fix _HAS_ITERATOR_DEBUGGING
1 parent 9dfaddd commit 82a7ee8

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

tools/premake/premake5.lua

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,17 +368,24 @@ function pluginSdkStaticLibProject(projectName, sdkdir, outName, isPluginProject
368368
if msbuild and (projectName == "plugin_iii" or projectName == "plugin_vc" or projectName == "plugin_sa") then
369369
pchheader "stdafx.h"
370370
forceincludes "stdafx.h"
371-
pchsource (path.getrelative(path.getabsolute("."), sdkdir .. "\\shared\\stdafx.cpp"))
371+
pchsource (path.getrelative(path.getabsolute("."), sdkdir .. "/shared/stdafx.cpp"))
372372

373373
filter "files:**stdafx.cpp"
374374
defines "USE_PCH"
375375

376-
local gameFiles = path.getrelative(path.getabsolute("."), sdkdir .. "\\" .. projectName .. "\\" .. gameName .. "\\**")
377-
filter ("files:" .. gameFiles)
376+
local projDir = path.getrelative(path.getabsolute("."), sdkdir .. "/" .. projectName)
377+
local gameFiles = projDir .. "/" .. gameName .. "/**"
378+
local attractorFiles = projDir .. "/game_vc/CPed*Attractor*" -- files using _HAS_ITERATOR_DEBUGGING macro
379+
380+
filter { "files:" .. gameFiles, "files:not " .. attractorFiles}
378381
defines "USE_PCH"
382+
379383
filter ("files:not " .. gameFiles)
380384
flags "NoPCH"
381385

386+
filter ("files:" .. attractorFiles)
387+
flags "NoPCH"
388+
382389
filter {}
383390
end
384391
else
@@ -609,10 +616,6 @@ function generatePrecompiledHeader(directory, create)
609616
#pragma once
610617
611618
#ifdef USE_PCH
612-
#ifdef _DEBUG
613-
#define _HAS_ITERATOR_DEBUGGING 0
614-
#endif
615-
616619
#include <algorithm>
617620
#include <array>
618621
#include <assert.h>

0 commit comments

Comments
 (0)