我知道如何在配置时使用data %>%
group_by(Subject, Ear, System, Pres_Level) %>%
summarize(SII = sii(speech = REM_SPL[Frequency %in% c(125, 250, 500, 1000, 2000, 3150, 4000, 6300, 8000)],
threshold = Thresh_SPL[Frequency %in% c(125, 250, 500, 1000, 2000, 3000, 4000, 6000, 8000)],
freq = Frequency[Frequency %in% c(125, 250, 500, 1000, 2000, 3150, 4000, 6300, 8000)],
method = "one-third octave",
interpolate = T)$sii)
# A tibble: 24 x 5
# Groups: Subject, Ear, System [?]
Subject Ear System Pres_Level SII
<fct> <fct> <fct> <fct> <dbl>
1 1 Left A 55 0.788
2 1 Left A 65 0.782
3 1 Left A 75 0.759
4 1 Left B 55 0.806
5 1 Left B 65 0.774
6 1 Left B 75 0.742
7 1 Right A 55 0.749
8 1 Right A 65 0.749
9 1 Right A 75 0.737
10 1 Right B 55 0.765
# ... with 14 more rows
命令生成错误。但是如何使用CMake强制我的构建失败?
我可以使用add_custom_command(TARGET MyFailingTarget POST_BUILD COMMAND myFailingCommand)想到一些东西,但这似乎很hacky。
答案 0 :(得分:0)
作为参考,这是我最终要做的事情(与我在问题中说的很相似):
add_custom_command(TARGET onlyInRelease PRE_BUILD
COMAND $<$<NOT:$<CONFIG:Release>>:TARGET_ALLOWED_FOR_RELEASE_BUILDS_ONLY>)