Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some deprecated apis #4032

Merged
merged 4 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove more codes
  • Loading branch information
waruqi committed Aug 1, 2023
commit 0f8899180e72c65ce48b37d30902b20f315bbdb9
15 changes: 0 additions & 15 deletions xmake/actions/build/kinds/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ function _do_link_target(target, opt)
local depvalues = {linkinst:program(), linkflags}
depend.on_changed(function ()

-- TODO make headers (deprecated)
if not dryrun then
local srcheaders, dstheaders = target:headers()
if srcheaders and dstheaders then
local i = 1
for _, srcheader in ipairs(srcheaders) do
local dstheader = dstheaders[i]
if dstheader then
os.cp(srcheader, dstheader)
end
i = i + 1
end
end
end

-- the target file
local targetfile = target:targetfile()

Expand Down
15 changes: 0 additions & 15 deletions xmake/actions/build/kinds/static.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ function _do_link_target(target, opt)
local depvalues = {linkinst:program(), linkflags}
depend.on_changed(function ()

-- TODO make headers (deprecated)
if not dryrun then
local srcheaders, dstheaders = target:headers()
if srcheaders and dstheaders then
local i = 1
for _, srcheader in ipairs(srcheaders) do
local dstheader = dstheaders[i]
if dstheader then
os.cp(srcheader, dstheader)
end
i = i + 1
end
end
end

-- the target file
local targetfile = target:targetfile()

Expand Down
4 changes: 0 additions & 4 deletions xmake/modules/target/action/clean/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ function main(target)
remove_files(target:pcoutputfile("c"))
remove_files(target:pcoutputfile("cxx"))

-- TODO remove the header files (deprecated)
local _, dstheaders = target:headers()
remove_files(dstheaders)

-- remove the clean files
remove_files(target:get("cleanfiles"))

Expand Down
18 changes: 0 additions & 18 deletions xmake/plugins/project/cmake/cmakelists.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1005,21 +1005,6 @@ function _add_target_custom_commands(cmakelists, target, outputdir)
_add_target_custom_commands_for_batchcmds(cmakelists, target, outputdir, "after", cmds_after)
end

-- TODO export target headers (deprecated)
function _export_target_headers(target)
local srcheaders, dstheaders = target:headers()
if srcheaders and dstheaders then
local i = 1
for _, srcheader in ipairs(srcheaders) do
local dstheader = dstheaders[i]
if dstheader then
os.cp(srcheader, dstheader)
end
i = i + 1
end
end
end

-- add target
function _add_target(cmakelists, target, outputdir)

Expand All @@ -1044,9 +1029,6 @@ function _add_target(cmakelists, target, outputdir)
raise("unknown target kind %s", target:kind())
end

-- TODO export target headers (deprecated)
_export_target_headers(target)

-- add target dependencies
_add_target_dependencies(cmakelists, target)

Expand Down
3 changes: 0 additions & 3 deletions xmake/plugins/project/make/makefile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,6 @@ function _add_clean_target(makefile, target, outputdir)
_add_remove_files(makefile, target:targetfile(), outputdir)
_add_remove_files(makefile, target:symbolfile(), outputdir)
_add_remove_files(makefile, target:objectfiles(), outputdir)
-- TODO remove the header files (deprecated)
local _, dstheaders = target:headers()
_add_remove_files(makefile, dstheaders, outputdir)
end
makefile:print("")
end
Expand Down