From 14bc6b588771419dd68e79cd133715e8400a54ac Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Mon, 27 May 2002 10:29:04 -0400 Subject: ENH: add tests for LESS, GREATER, STRLESS, STRGREATER (IF command) --- Tests/Complex/Executable/complex.cxx | 96 +++++++++++++++++++++++ Tests/Complex/VarTests.cmake | 54 +++++++++++++ Tests/ComplexOneConfig/Executable/complex.cxx | 96 +++++++++++++++++++++++ Tests/ComplexOneConfig/VarTests.cmake | 54 +++++++++++++ Tests/ComplexRelativePaths/Executable/complex.cxx | 96 +++++++++++++++++++++++ Tests/ComplexRelativePaths/VarTests.cmake | 54 +++++++++++++ 6 files changed, 450 insertions(+) diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 1dbf54f..e8885e5 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -343,6 +343,102 @@ int main() cmPassed("SHOULD_BE_DEFINED_EXISTS2 is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_LESS + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_LESS is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_LESS + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_LESS is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_LESS2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_LESS2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_LESS2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_LESS2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_GREATER + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_GREATER + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_GREATER is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_GREATER2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_GREATER2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRLESS + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRLESS + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRLESS is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRLESS2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRLESS2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRGREATER + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRGREATER2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined."); +#endif + // ---------------------------------------------------------------------- // Test FOREACH diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake index 48d04c1..ff18844 100644 --- a/Tests/Complex/VarTests.cmake +++ b/Tests/Complex/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 # diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 1dbf54f..e8885e5 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -343,6 +343,102 @@ int main() cmPassed("SHOULD_BE_DEFINED_EXISTS2 is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_LESS + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_LESS is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_LESS + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_LESS is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_LESS2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_LESS2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_LESS2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_LESS2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_GREATER + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_GREATER + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_GREATER is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_GREATER2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_GREATER2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRLESS + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRLESS + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRLESS is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRLESS2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRLESS2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRGREATER + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRGREATER2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined."); +#endif + // ---------------------------------------------------------------------- // Test FOREACH 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 # diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index 1dbf54f..e8885e5 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -343,6 +343,102 @@ int main() cmPassed("SHOULD_BE_DEFINED_EXISTS2 is defined."); #endif +#ifdef SHOULD_NOT_BE_DEFINED_LESS + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_LESS is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_LESS + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_LESS is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_LESS2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_LESS2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_LESS2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_LESS2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_LESS2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_LESS2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_GREATER + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_GREATER is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_GREATER + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_GREATER is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_GREATER2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_GREATER2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_GREATER2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_GREATER2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_GREATER2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_GREATER2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRLESS + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRLESS + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRLESS is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRLESS2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRLESS2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRLESS2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRLESS2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRLESS2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRLESS2 is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRGREATER + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRGREATER is defined."); +#endif + +#ifdef SHOULD_NOT_BE_DEFINED_STRGREATER2 + cmFailed("IF or SET is broken, SHOULD_NOT_BE_DEFINED_STRGREATER2 is defined."); +#else + cmPassed("SHOULD_NOT_BE_DEFINED_STRGREATER2 is not defined."); +#endif + +#ifndef SHOULD_BE_DEFINED_STRGREATER2 + cmFailed("IF or SET is broken, SHOULD_BE_DEFINED_STRGREATER2 is not defined.\n"); +#else + cmPassed("SHOULD_BE_DEFINED_STRGREATER2 is defined."); +#endif + // ---------------------------------------------------------------------- // Test FOREACH diff --git a/Tests/ComplexRelativePaths/VarTests.cmake b/Tests/ComplexRelativePaths/VarTests.cmake index 48d04c1..ff18844 100644 --- a/Tests/ComplexRelativePaths/VarTests.cmake +++ b/Tests/ComplexRelativePaths/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 # -- cgit v0.12