Skip to content

cmake: fix "retde-decompiler" typo in RETDEC_ENABLE component matching#1237

Open
takano32 wants to merge 1 commit into
avast:masterfrom
takano32:fix/retdec-enable-typo
Open

cmake: fix "retde-decompiler" typo in RETDEC_ENABLE component matching#1237
takano32 wants to merge 1 commit into
avast:masterfrom
takano32:fix/retdec-enable-typo

Conversation

@takano32

Copy link
Copy Markdown
Contributor

Problem

cmake/options.cmake matches the tokens of the documented -DRETDEC_ENABLE=<comma-separated component list> interface (README, "Build and Installation") against component names, but the entry for the decompiler was missing a character:

set_if_equal(${t} "retde-decompiler" RETDEC_ENABLE_RETDEC_DECOMPILER)

Because the token retdec-decompiler never matches the misspelled string, the documented invocation

cmake -DRETDEC_ENABLE=retdec-decompiler ..

sets no component flag at all, so RETDEC_ENABLE_ALL stays ON and the entire project is built instead of the requested minimal set. In a mixed list such as -DRETDEC_ENABLE=retdec-decompiler,fileformat, the decompiler component is silently dropped.

Fix

One character: "retde-decompiler""retdec-decompiler" (the component name used by src/CMakeLists.txt). The misspelled string appears nowhere else in the repository.

Testing

Configuring a minimal project that includes options.cmake with -DRETDEC_ENABLE=retdec-decompiler:

RETDEC_ENABLE_RETDEC_DECOMPILER RETDEC_ENABLE_ALL
before ON (only via ALL) ON — selection silently ignored
after ON (matched) OFF — only the requested component set is built

🤖 Generated with Claude Code

https://claude.ai/code/session_014nNMVbAuffaPPQuYdLZgD1

The match string for the retdec-decompiler component was missing a
'c', so the documented invocation

    cmake -DRETDEC_ENABLE=retdec-decompiler ..

never matched any component. Since no component flag got set,
RETDEC_ENABLE_ALL stayed ON and the entire project was built instead
of the requested minimal set; in a mixed list such as
-DRETDEC_ENABLE=retdec-decompiler,fileformat the decompiler component
was silently dropped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nNMVbAuffaPPQuYdLZgD1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant