summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInari0 <[email protected]>2024-12-20 15:02:19 +0800
committerGitHub <[email protected]>2024-12-20 15:02:19 +0800
commit08d49c4e6f53b91382825e8634a67890d962372c (patch)
treed68f9caa2936f02efdaf6762967235cbbbc9264e
parentb673bd17ca0bc1a27ea5e16e1a7f45d873cba929 (diff)
add profile to vs project
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
index 21d4c6881..b69826694 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
@@ -816,6 +816,9 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo)
-- save subsystem
local subsystem = "Console"
+ -- save profile
+ local profile = false
+
-- make linker flags
local flags = {}
local excludes = {
@@ -836,6 +839,8 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo)
elseif flag_lower:find("[^%-/].+%.lib") then
-- link file
table.insert(links, flag)
+ elseif flag_lower:find("[%-/]profile") then
+ profile = true
else
local excluded = false
for _, exclude in ipairs(excludes) do
@@ -870,6 +875,9 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo)
-- generate debug infomation?
if linkerkinds[targetinfo.targetkind] == "Link" then
+ -- enable profile?
+ vcxprojfile:print("<Profile>%s</Profile>", tostring(profile))
+
-- enable debug infomation?
local debug = false
for _, symbol in ipairs(targetinfo.symbols) do