c语言report怎么添加参数,如何在cmake中将引用的参数传递给add_test?

我正在尝试将参数传递给cmake的gtest测试套件:

add_test(NAME craft_test

COMMAND craft --gtest_output='xml:report.xml')

问题是这些参数被引号包围,为什么?它看起来像一个bug,是否有一种避免它的好方法?

$ctest -V

UpdateCTestConfiguration from :/usr/local/src/craft/build-analyze/DartConfiguration.tcl

UpdateCTestConfiguration from :/usr/local/src/craft/build-analyze/DartConfiguration.tcl

Test project /usr/local/src/craft/build-analyze

Constructing a list of tests

Done constructing a list of tests

Checking test dependency graph...

Checking test dependency graph end

test 1

Start 1: craft_test

1: Test command: /usr/local/src/craft/build-analyze/craft "--gtest_output='xml:report.xml'"

1: Test timeout computed to be: 9.99988e+06

1: WARNING: unrecognized output format "'xml" ignored.

1: [==========] Running 1 test from 1 test case.

1: [----------] Global test environment set-up.

1: [----------] 1 test from best_answer_test

1: [ RUN ] best_answer_test.test_sample

1: [ OK ] best_answer_test.test_sample (0 ms)

1: [----------] 1 test from best_answer_test (0 ms total)

1:

1: [----------] Global test environment tear-down

1: [==========] 1 test from 1 test case ran. (0 ms total)

1: [ PASSED ] 1 test.

1/1 Test #1: craft_test ....................... Passed 0.00 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) = 0.00 sec

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值