Skip to content

Custom commands - #198

Merged
mrexodia merged 11 commits into
mainfrom
custom-commands
Jul 10, 2026
Merged

Custom commands#198
mrexodia merged 11 commits into
mainfrom
custom-commands

Conversation

@mrexodia

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:79361129f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadsrc/cmake_generator.cpp Outdated
Comment threadsrc/project_parser.cpp
@mrexodia
mrexodiaforce-pushed the custom-commands branch 2 times, most recently from 5c81015 to 570ec4cCompareApril 14, 2026 10:12

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:570ec4c93f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadsrc/project_parser.cpp Outdated
Comment threadsrc/project_parser.cpp

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:9feac49f95

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadtests/generator-executable/cmake.toml
Comment threadsrc/cmake_generator.cpp
Comment threadsrc/cmake_generator.cpp

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:31f77ab328

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadsrc/cmake_generator.cpp Outdated
Comment threadsrc/cmake_generator.cpp Outdated

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:da4ec26df0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadsrc/project_parser.cpp Outdated
@mrexodia
mrexodia merged commit cf10556 into mainJul 10, 2026
8 checks passed
@mrexodia
mrexodia deleted the custom-commands branch July 10, 2026 13:42

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:a59bf9ace9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1012 to +1014
if (resolved_target_type == target_interface) {
throw_key_error("build-event cannot be used with type = \"interface\"", "build-event", custom.find("build-event"));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject TARGET-form custom commands on object libraries

Checked cmake --help-command add_custom_command: the TARGET form is for a library or executable, and CMake rejects object libraries with may not have PRE_BUILD, PRE_LINK, or POST_BUILD commands. This validation only excludes interface targets here, so type = "object" with any build-event is accepted and cmkr emits add_custom_command(TARGET obj ...), causing a configure-time failure. Add a target_object guard in this branch.

Useful? React with 👍 / 👎.

}
auto &condition_sources = msources[custom_command.condition];
for (const auto &output : custom_command.outputs) {
condition_sources.insert(normalize_generated_output_source(output));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid grouping binary-dir generated outputs under source tree

When a custom-command output is normalized to ${CMAKE_CURRENT_BINARY_DIR}/..., it is later included in the target source list and passed to source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ...) below. cmake --help-command source_group says the TREE form fails unless every FILES path starts with the root; with [cmake].build-dir outside the source tree, these valid generated sources make configure fail before building. Keep binary-dir generated outputs out of that source_group or group them under the binary root separately.

Useful? React with 👍 / 👎.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@mrexodia