summaryrefslogtreecommitdiffstats
path: root/Tests/Complex/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Complex/CMakeLists.txt')
-rw-r--r--Tests/Complex/CMakeLists.txt42
1 files changed, 41 insertions, 1 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 81ade76..fa3ee41 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -100,8 +100,9 @@ INCLUDE_DIRECTORIES(
INCLUDE_DIRECTORIES(BEFORE
${Complex_BINARY_DIR}
)
+INCLUDE_DIRECTORIES(SYSTEM Library/SystemDir)
-INCLUDE_REGULAR_EXPRESSION("^(cmTest|file|sharedFile).*$" "^cmMissing")
+INCLUDE_REGULAR_EXPRESSION("^(cmTest|file|sharedFile|test).*$" "^cmMissing")
LINK_DIRECTORIES(
${Complex_BINARY_DIR}/Library
@@ -271,6 +272,44 @@ ENDWHILE(while_var LESS 1000)
SET(SHOULD_BE_ZERO )
SET(SHOULD_BE_ONE 1)
+
+# test elseif functionality, the mess below tries to catch problem
+# of clauses being executed early or late etc
+set (RESULT 3)
+if (RESULT EQUAL 1)
+ if (RESULT EQUAL 2)
+ set (ELSEIF_RESULT 1)
+ elseif (RESULT EQUAL 3)
+ set (ELSEIF_RESULT 1)
+ endif (RESULT EQUAL 2)
+elseif (RESULT EQUAL 2)
+ set (ELSEIF_RESULT 1)
+elseif (RESULT EQUAL 3)
+ if (RESULT EQUAL 2)
+ set (ELSEIF_RESULT 1)
+ elseif (RESULT EQUAL 3)
+ if (NOT ELSEIF_RESULT EQUAL 1)
+ set (ELSEIF_RESULT 2)
+ endif (NOT ELSEIF_RESULT EQUAL 1)
+ endif (RESULT EQUAL 2)
+elseif (RESULT EQUAL 4)
+ if (RESULT EQUAL 2)
+ set (ELSEIF_RESULT 1)
+ elseif (RESULT EQUAL 3)
+ set (ELSEIF_RESULT 1)
+ endif (RESULT EQUAL 2)
+else (RESULT EQUAL 1)
+ if (RESULT EQUAL 2)
+ set (ELSEIF_RESULT 1)
+ elseif (RESULT EQUAL 3)
+ set (ELSEIF_RESULT 1)
+ endif (RESULT EQUAL 2)
+endif (RESULT EQUAL 1)
+
+if (NOT ELSEIF_RESULT EQUAL 2)
+ set (ELSEIF_RESULT 0)
+endif (NOT ELSEIF_RESULT EQUAL 2)
+
#
# Configure file
# (plug vars to #define so that they can be tested)
@@ -303,6 +342,7 @@ IF(NOT STRING_REGEX_PASSED)
"STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
ENDIF(NOT STRING_REGEX_PASSED)
+
#
# Create the libs and the main exe
#