diff options
| author | ruki <[email protected]> | 2024-02-19 22:55:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-02-19 22:55:45 +0800 |
| commit | f4a9a9e3fa36f3f0cf1e655c58bf3fa4d546348b (patch) | |
| tree | 0b42eb09db96cdc6cea528fafecc4e1b274d6d0e /xmake/plugins/project/cmake/cmakelists.lua | |
| parent | 7e126bdbcc883f59c43ccc94eb80f2607d612ef0 (diff) | |
improve target_buildcmd
Diffstat (limited to 'xmake/plugins/project/cmake/cmakelists.lua')
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 98a94338d..a6316adf2 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -976,16 +976,16 @@ function _add_target_custom_commands(cmakelists, target, outputdir) -- add before commands -- we use irpairs(groups), because the last group that should be given the highest priority. local cmds_before = {} - target_cmds.get_target_buildcmd(target, cmds_before, "before") - target_cmds.get_target_buildcmd_sourcegroups(target, cmds_before, sourcegroups, "before") + target_cmds.get_target_buildcmd(target, cmds_before, {suffix = "before"}) + target_cmds.get_target_buildcmd_sourcegroups(target, cmds_before, sourcegroups, {suffix = "before"}) -- rule.on_buildcmd_files should also be executed before building the target, as cmake PRE_BUILD does not work. target_cmds.get_target_buildcmd_sourcegroups(target, cmds_before, sourcegroups) _add_target_custom_commands_for_batchcmds(cmakelists, target, outputdir, "before", cmds_before) -- add after commands local cmds_after = {} - target_cmds.get_target_buildcmd_sourcegroups(target, cmds_after, sourcegroups, "after") - target_cmds.get_target_buildcmd(target, cmds_after, "after") + target_cmds.get_target_buildcmd_sourcegroups(target, cmds_after, sourcegroups, {suffix = "after"}) + target_cmds.get_target_buildcmd(target, cmds_after, {suffix = "after"}) _add_target_custom_commands_for_batchcmds(cmakelists, target, outputdir, "after", cmds_after) end |
