Closed gabrielmaneru closed 3 years ago
I'm not familiar with that one, I'll try to take a look later. In the meantime, does this answer help at all?
Thanks to @L4ZZA 's post on your linked issue which gave an example for this problem by dropping everything at the top of the file:
if os.istarget "Windows" then
require "vstudio"
local p = premake;
local vc = p.vstudio.vc2010;
function disableFastUpToDateCheck(prj, cfg)
vc.element("DisableFastUpToDateCheck", nil, "true")
end
p.override(vc.elements, "globalsCondition",
function(oldfn, prj, cfg)
local elements = oldfn(prj, cfg)
elements = table.join(elements, {disableFastUpToDateCheck})
return elements
end)
end
It works perfect as a patch for my personal projects, however I do think there should be an easier and cleaner way to add a new specific flag. I don't know if that's even possible but something like:
filter "system:windows"
systemversion "latest"
propconfig ("DisableFastUpToDateCheck", "true")
That is not (easily) possible, but this is:
filter "system:windows"
systemversion "latest"
fastUpToDateCheck "off"
You just need to register the new field in src/_premake_init.lua, and then find the right spot to add the element in modules/vstudio/vc2010_vcxproj.lua. Lots of examples to copy from in those files; feel free to ask any questions here. You can put the changes in your own project or system script, or submit a pull request and we'll get it merged into core ASAP.
Would a maintainer be willing to reopen and fix this? The setting is crucial for projects with generated code as it causes them to rebuild every time.
Until this is fixed, how can I edit the patch to only apply to specified projects? Regardless of where I put it, it changes all of them.
Why not fix it and submit a PR?
I'm going to close this off in favour of #1443.
What are you trying to do? I want to add some specific configuration into the Property Group.
What problem are you having? I don't know how to develop new content for premake.
What have you tried so far? I tried adding a new action. I also tried to inspect the src files of premake to understand their framework but didn't get it.
What version of Premake are you using? 5.0
Anything else we should know? The property I want to add: PropertyGroup DisableFastUpToDateCheck true /DisableFastUpToDateCheck /PropertyGroup
(You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to issues like these!)