diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-20 01:58:57 -0500 |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-20 01:58:57 -0500 |
commit | 6f3570656caf463addeb9edafcecba33f0efcbb9 (patch) | |
tree | d7c00a97f0216851a1adc583ec0ed737b3e99e8e /Tests/ComplexOneConfig/VarTests.cmake | |
parent | f04128ad63b560079ab49118b9e64e2fe73ba39b (diff) | |
download | cmake-6f3570656caf463addeb9edafcecba33f0efcbb9.tar.gz |
Increase Coverage.
Diffstat (limited to 'Tests/ComplexOneConfig/VarTests.cmake')
-rw-r--r-- | Tests/ComplexOneConfig/VarTests.cmake | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake index e4fb156708..800a66e732 100644 --- a/Tests/ComplexOneConfig/VarTests.cmake +++ b/Tests/ComplexOneConfig/VarTests.cmake @@ -2,6 +2,7 @@ # Test SET # SET (ZERO_VAR 0) +SET (ZERO_VAR2 0) IF(ZERO_VAR) ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED) @@ -22,30 +23,66 @@ VARIABLE_REQUIRES(ONE_VAR # # Test various IF/ELSE combinations # +IF(NOT ZERO_VAR) + ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_NOT) +ELSE(NOT ZERO_VAR) + ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_NOT) +ENDIF(NOT ZERO_VAR) + +IF(NOT ONE_VAR) + ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_NOT2) +ELSE(NOT ONE_VAR) + ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_NOT2) +ENDIF(NOT ONE_VAR) + IF(ONE_VAR AND ONE_VAR2) ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_AND) ELSE(ONE_VAR AND ONE_VAR2) ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_AND) ENDIF(ONE_VAR AND ONE_VAR2) +IF(ONE_VAR AND ZERO_VAR) + ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_AND2) +ELSE(ONE_VAR AND ZERO_VAR) + ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_AND2) +ENDIF(ONE_VAR AND ZERO_VAR) + IF(ZERO_VAR OR ONE_VAR2) ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_OR) ELSE(ZERO_VAR OR ONE_VAR2) ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_OR) ENDIF(ZERO_VAR OR ONE_VAR2) +IF(ZERO_VAR OR ZERO_VAR2) + ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_OR2) +ELSE(ZERO_VAR OR ZERO_VAR2) + ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_OR2) +ENDIF(ZERO_VAR OR ZERO_VAR2) + IF(STRING_VAR MATCHES "^CMake") ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_MATCHES) ELSE(STRING_VAR MATCHES "^CMake") ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_MATCHES) ENDIF(STRING_VAR MATCHES "^CMake") +IF(STRING_VAR MATCHES "^foo") + ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_MATCHES2) +ELSE(STRING_VAR MATCHES "^foo") + ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_MATCHES2) +ENDIF(STRING_VAR MATCHES "^foo") + IF(COMMAND "IF") ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_COMMAND) ELSE(COMMAND "IF") ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_COMMAND) ENDIF(COMMAND "IF") +IF(COMMAND "ROQUEFORT") + ADD_DEFINITIONS(-DSHOULD_NOT_BE_DEFINED_COMMAND2) +ELSE(COMMAND "ROQUEFORT") + ADD_DEFINITIONS(-DSHOULD_BE_DEFINED_COMMAND2) +ENDIF(COMMAND "ROQUEFORT") + # # Test FOREACH # |