diff options
| author | ruki <[email protected]> | 2023-04-22 00:37:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-04-22 00:37:12 +0800 |
| commit | e003dc3b3afe8f3be6a18b9aaf03f85750e6c815 (patch) | |
| tree | a5a31e230e012d3bedee12ab72d5d3719d0a0f0c | |
| parent | 1e31f3a9da25e2f2b287dc1b4462e71d53fabf80 (diff) | |
improve comments
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 00e8c077b..2129a062e 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -995,7 +995,6 @@ function _add_batchjobs_for_group(batchjobs, rootjob, target, group, suffix) end end - -- add target custom commands function _add_target_custom_commands(cmakelists, target, outputdir) @@ -1003,6 +1002,7 @@ function _add_target_custom_commands(cmakelists, target, outputdir) local groups = rule_groups.build_sourcebatch_groups(target, target:sourcebatches()) -- add before commands + -- we use irpairs(groups), because the last group that should be given the highest priority. local cmds_before = {} _add_target_custom_commands_for_target(cmakelists, target, cmds_before, "before") for idx, group in irpairs(groups) do @@ -1012,6 +1012,7 @@ function _add_target_custom_commands(cmakelists, target, outputdir) if item.rule then if not _sourcebatch_is_built(sourcebatch) then _add_target_custom_commands_for_objectrules(cmakelists, target, sourcebatch, cmds_before, "before") + -- rule.on_buildcmd_files should also be executed before building the target, as cmake PRE_BUILD does not work. _add_target_custom_commands_for_objectrules(cmakelists, target, sourcebatch, cmds_before) end end |
