diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-10-17 20:39:58 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-10-17 20:39:58 (GMT) |
commit | 427ed70363ad4aea83e071f46d9704f69472017d (patch) | |
tree | f488892cff7f80d45f9367691d739259472b2b92 /Tests/MathTest/CMakeLists.txt | |
parent | a7d4b61699fe7693f8c2db4727f9a3f98fd51d02 (diff) | |
download | CMake-427ed70363ad4aea83e071f46d9704f69472017d.zip CMake-427ed70363ad4aea83e071f46d9704f69472017d.tar.gz CMake-427ed70363ad4aea83e071f46d9704f69472017d.tar.bz2 |
ENH: Add math test
Diffstat (limited to 'Tests/MathTest/CMakeLists.txt')
-rw-r--r-- | Tests/MathTest/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/MathTest/CMakeLists.txt b/Tests/MathTest/CMakeLists.txt new file mode 100644 index 0000000..6f7a60c --- /dev/null +++ b/Tests/MathTest/CMakeLists.txt @@ -0,0 +1,25 @@ +PROJECT(MathTest) + + +# Expression test + +SET(expressions + "5 * ( 3 + 4)" + "(1 | 2 | 4 | 8) & 16" + ) + +SET(FILE_EXPRESSIONS "") +FOREACH(expression + ${expressions}) + MATH(EXPR expr "${expression}") + SET(FILE_EXPRESSIONS "${FILE_EXPRESSIONS}TEST_EXPRESSION(${expression}, ${expr})\n") +ENDFOREACH(expression) + +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/MathTestTests.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/MathTestTests.h" + @ONLY) + +INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}") +ADD_EXECUTABLE(MathTestExec MathTestExec.cxx) + |