Skip to content

Commit

Permalink
ptx files will activate extension
Browse files Browse the repository at this point in the history
  • Loading branch information
theComputeKid committed Apr 9, 2023
1 parent 495e43c commit 2efcd7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/premake5-cuda-vs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ premake.override(premake.vstudio.vc2010.elements, "project", function(base, prj)
local calls = base(prj)

--* Only enabled if cudaProject defined.
if (prj.project.cudaFiles ~= nil) then
if (prj.project.cudaFiles ~= nil or prj.project.cudaPTXFiles ~= nil) then
table.insertafter(calls, premake.vstudio.vc2010.files, cudaProjectProps)
end

Expand All @@ -155,7 +155,7 @@ end)
premake.override(premake.vstudio.vc2010.elements, "itemDefinitionGroup", function(oldfn, cfg)
local items = oldfn(cfg)
--* Only enabled if cudaProject defined.
if (cfg.project.cudaFiles ~= nil) then
if (cfg.project.cudaFiles ~= nil or cfg.project.cudaPTXFiles ~= nil) then
table.insert(items, addCompilerProps)
table.insert(items, addLinkerProps)
end
Expand All @@ -165,7 +165,7 @@ end)
--* Add globals
premake.override(premake.vstudio.vc2010.elements, "globals", function(base, prj)
local calls = base(prj)
if (prj.project.cudaFiles ~= nil) then
if (prj.project.cudaFiles ~= nil or prj.project.cudaPTXFiles ~= nil) then
table.insertafter(calls, prj.projectGuid, addGlobals)
end
return calls
Expand Down

0 comments on commit 2efcd7f

Please sign in to comment.