Updated formatting of documentation plus a little reorganization.
[cmake.git] / Tests / MathTest / CMakeLists.txt
blobd1e5b1acd873870647e257ea5c0475ecf30dcde0
1 cmake_minimum_required (VERSION 2.6)
2 PROJECT(MathTest)
5 # Expression test
7 SET(expressions
8   "5 * ( 3 + 4)"
9   "(1 | 2 | 4 | 8) & 16"
10   "1 +(3*4) + 10 >> 2"
11   "10000 / 20 / 4"
12   "10000 / (20 / 4)"
13   )
15 SET(FILE_EXPRESSIONS "")
16 FOREACH(expression
17     ${expressions})
18   MATH(EXPR expr "${expression}")
19   SET(FILE_EXPRESSIONS "${FILE_EXPRESSIONS}TEST_EXPRESSION(${expression}, ${expr})\n")
20 ENDFOREACH(expression)
22 CONFIGURE_FILE(
23   "${CMAKE_CURRENT_SOURCE_DIR}/MathTestTests.h.in"
24   "${CMAKE_CURRENT_BINARY_DIR}/MathTestTests.h"
25   @ONLY)
27 INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
28 ADD_EXECUTABLE(MathTest MathTestExec.cxx)