CMake在add_test中,如何指定不同的类别

时间:2018-08-27 18:18:09

标签: cmake

我有带有单元测试,模糊测试和集成测试的项目。我只希望单元测试无法建立客户。我对CI使用模糊和集成。我希望拥有的是生成的目标,例如:

make test
make fuzz
make integration

我整个上午都在搜寻cmake源代码,除了以下内容之外,我没有找到其他产生方法:

make test

我必须缺少明显的东西。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

作为解决方法,您可以添加新的配置类型(除了默认的$_POST ( [program_id] => Array ( [0] => 1 ... [9] => 10 ) [title] => Array ( [0] => Program 1 ... [9] => Program 10 ) ) $_FILES ( [files] => Array ( [name] => Array ( [0] => 109_0158.MP4 ) [type] => Array ( [0] => video/mp4) [tmp_name] => Array ( [0] => C:\uploads\tmp\php6AEE.tmp ) [error] => Array ( [0] => 0 ) [size] => Array ( [0] => 204109399 ) ) ) DebugReleaseRelWithDebInfo之外),然后使用配置类型。 例如:

MinSizeRel

这将使您仅在使用set(CMAKE_CONFIGURATION_TYPES Debug DebugFuzzer Release RelWithDebInfo MinSizeRel) # ... add_test(NAME FuzzTest COMMAND FuzzTestDriver CONFIGURATIONS DebugFuzzer)

构建时运行模糊测试