diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-20 06:58:57 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2002-01-20 06:58:57 (GMT) |
commit | 6f3570656caf463addeb9edafcecba33f0efcbb9 (patch) | |
tree | d7c00a97f0216851a1adc583ec0ed737b3e99e8e /Tests/Complex/VarTests.cmake | |
parent | f04128ad63b560079ab49118b9e64e2fe73ba39b (diff) | |
download | CMake-6f3570656caf463addeb9edafcecba33f0efcbb9.zip CMake-6f3570656caf463addeb9edafcecba33f0efcbb9.tar.gz CMake-6f3570656caf463addeb9edafcecba33f0efcbb9.tar.bz2 |
Increase Coverage.
Diffstat (limited to 'Tests/Complex/VarTests.cmake')
-rw-r--r-- | Tests/Complex/VarTests.cmake | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake index e4fb156..800a66e 100644 --- a/Tests/Complex/VarTests.cmake +++ b/Tests/Complex/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 # |