New utility macro for conditionally setting a variable?
Open
Nobody has claimed this yet.
feature
question
- Dominant language
- C++
- Stars
- 296
- Forks
- 66
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 1
Description
It might be useful to add a new utility macro to set a variable using a ternary operator
blt_set(TO <var>
IF <cnd>
THEN <true_val>
ELSE <false_val>
[CACHE TRUE|FALSE]
)
This would replace the following
if( <cnd> )
set(<var> <true_val>)
else()
set(<var> <false_val>)
endif()
Other possible names:
- blt_conditional_set
- blt_ternary_set
- blt_set_if
- blt_ternary
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation file, test, or entry point. Start by locating BLT's existing utility macros and CMake tests, then compare their argument and CACHE conventions with the proposed conditional form; done means agreeing on the macro name and behavior and adding coverage for both condition branches and cache handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100