summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig/VarTests.cmake
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-05-27 14:29:04 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-05-27 14:29:04 (GMT)
commit14bc6b588771419dd68e79cd133715e8400a54ac (patch)
tree561a88282471da45ac6c5f81505d977366437df7 /Tests/ComplexOneConfig/VarTests.cmake
parent23772b369d4456cd58417d7ecd3278c5afcd0b58 (diff)
downloadCMake-14bc6b588771419dd68e79cd133715e8400a54ac.zip
CMake-14bc6b588771419dd68e79cd133715e8400a54ac.tar.gz
CMake-14bc6b588771419dd68e79cd133715e8400a54ac.tar.bz2
ENH: add tests for LESS, GREATER, STRLESS, STRGREATER (IF command)
Diffstat (limited to 'Tests/ComplexOneConfig/VarTests.cmake')
-rw-r--r--Tests/ComplexOneConfig/VarTests.cmake54
1 files changed, 54 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake
index 48d04c1..ff18844 100644
--- a/Tests/ComplexOneConfig/VarTests.cmake
+++ b/Tests/ComplexOneConfig/VarTests.cmake
@@ -95,6 +95,60 @@ ELSE(EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_EXISTS2)
ENDIF (EXISTS ${Complex_SOURCE_DIR}/roquefort.txt)
+SET (SNUM1_VAR "1")
+SET (SNUM2_VAR "2")
+
+IF (SNUM1_VAR LESS SNUM2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_LESS)
+ELSE (SNUM1_VAR LESS SNUM2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_LESS)
+ENDIF (SNUM1_VAR LESS SNUM2_VAR)
+
+IF (SNUM2_VAR LESS SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_LESS2)
+ELSE (SNUM2_VAR LESS SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_LESS2)
+ENDIF (SNUM2_VAR LESS SNUM1_VAR)
+
+IF (SNUM2_VAR GREATER SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_GREATER)
+ELSE (SNUM2_VAR GREATER SNUM1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER)
+ENDIF (SNUM2_VAR GREATER SNUM1_VAR)
+
+IF (SNUM1_VAR GREATER SNUM2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_GREATER2)
+ELSE (SNUM1_VAR GREATER SNUM2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_GREATER2)
+ENDIF (SNUM1_VAR GREATER SNUM2_VAR)
+
+SET (SSTR1_VAR "abc")
+SET (SSTR2_VAR "bcd")
+
+IF (SSTR1_VAR STRLESS SSTR2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_STRLESS)
+ELSE (SSTR1_VAR STRLESS SSTR2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_STRLESS)
+ENDIF (SSTR1_VAR STRLESS SSTR2_VAR)
+
+IF (SSTR2_VAR STRLESS SSTR1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_STRLESS2)
+ELSE (SSTR2_VAR STRLESS SSTR1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_STRLESS2)
+ENDIF (SSTR2_VAR STRLESS SSTR1_VAR)
+
+IF (SSTR2_VAR STRGREATER SSTR1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_STRGREATER)
+ELSE (SSTR2_VAR STRGREATER SSTR1_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_STRGREATER)
+ENDIF (SSTR2_VAR STRGREATER SSTR1_VAR)
+
+IF (SSTR1_VAR STRGREATER SSTR2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_STRGREATER2)
+ELSE (SSTR1_VAR STRGREATER SSTR2_VAR)
+ ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_STRGREATER2)
+ENDIF (SSTR1_VAR STRGREATER SSTR2_VAR)
+
#
# Test FOREACH
#