blob: 4ec7f9c57fc20dd945f79cce770e12ef1ef0f61b (
plain)
1
2
3
4
5
6
7
8
9
|
macro(math_test expression expected)
math(EXPR evaluated ${expression} ${ARGN})
if (NOT evaluated STREQUAL ${expected})
message(FATAL_ERROR "wrong math result: ${evaluated} != ${expected}")
endif ()
endmacro()
math_test("100 * 10" 1000)
|