Files
CMake/Tests/RunCMake/math/MATH-ToleratedExpression.cmake
Brad King 406f397e8b math: Restore toleration of unexpected characters in an expression
Prior to commit 7c4c13ffef (math: Reject unexpected expression input
explicitly, 2018-05-18) we ignored unexpected characters in an
expression that otherwise can be parsed.  In order to preserve
compatibility with projects that accidentally used this, convert the
error to a warning.
2018-07-16 14:46:43 -04:00

5 lines
111 B
CMake

math(EXPR var "'2*1-1'")
if(NOT var EQUAL 1)
message(FATAL_ERROR "Expression did not evaluate to 1")
endif()