CMake的if命令[1]支持多个签名,
if(<constant>)
if(<variable|string>)
if(NOT <expression>)
如何否定前两个?
如果CMake文档是正确的(根据我的经验还不确定),那么我的问题可以归结为:
如何将常量,变量或字符串X转换为表达式,并附加要求将X评估为布尔值?
答案 0 :(得分:1)
实际上,<div id="print_result" style="display:none">
<div class="row">
<!-- Start of Symptoms Card/Table/Section -->
<div class="col-md-6">
<div class="card">
<div class="card-header">
<div class="text-center"><span class="section-heading-text">SYMPTOMS</span></div>
</div>
<?php if($quizDataArray['symptoms']): ?>
{% for key, symptom in quizDataArray['symptoms'] %}
<div class="col-md-12 card-box">
<div class="card-body">
<h5 class="card-title">{{ symptom['title'] }}</h5>
<?php if (isset($symptom['results'])): ?>
<h6 class="card-subtitle mb-2 text-muted">
{% for key, result in symptom['results'] %}
<?php $causeId = key($result); ?>
{{ resultKeyArray[key] }} <?php if($causeId) { ?> {{ result[causeId] }} <?php } ?>
{% endfor %}
</h6>
<?php endif;?>
</div>
</div>
{% endfor %}
<?php endif; ?>
<div class="text-center"><span class="section-heading-text">DR. RECOMMENDED PRODUCTS</span></div>
<?php if($thingsToTry): ?>
<?php foreach ($thingsToTry as $remedy): ?>
<div class="col-md-12 card-box">
<div class="card-body">
<!-- Todo: To print image here -->
<div class="col-md-8">
<div class="info-box">
<h5><?php echo $remedy['title'] ?></h5>
<p>
<?php echo $remedy['description'] ?>
</p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<?php endforeach; ?>
<?php endif; ?>
<div class="text-center"><span class="section-heading-text">Health Food Store Recommendations</span></div>
<?php if($thingsToTry): ?>
{% for key, remedy in thingsToTry %}
<div class="remedy-box">
<h5><strong>*{{ remedy['title'] }}</strong></h5>
</div>
{% endfor %}
<?php endif; ?>
</div>
</div><!-- End of Symptoms Card/Table/Section -->
</div>
只是任何参数的占位符,可以将其传递给<expression>
。甚至可能的if
构造的列表的标题都为“可能的表达式为”。
if