summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Complex/CMakeLists.txt6
-rw-r--r--Tests/Complex/Executable/complex.cxx6
-rw-r--r--Tests/Complex/cmTestConfigure.h.in4
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt6
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx6
-rw-r--r--Tests/ComplexOneConfig/cmTestConfigure.h.in4
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt6
-rw-r--r--Tests/ComplexRelativePaths/Executable/complex.cxx6
-rw-r--r--Tests/ComplexRelativePaths/cmTestConfigure.h.in4
9 files changed, 48 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 1814528..c3f94b7 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -336,6 +336,12 @@ if (NOT ELSEIF_RESULT EQUAL 2)
set (ELSEIF_RESULT 0)
endif (NOT ELSEIF_RESULT EQUAL 2)
+# test handling of parenthetical groups in conditionals
+if (2 GREATER 1 AND (4 LESS 3 OR 5 LESS 6) AND NOT (7 GREATER 8))
+ set(CONDITIONAL_PARENTHESES 1)
+endif()
+
+
#
# Configure file
# (plug vars to #define so that they can be tested)
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 95e77b6..0ecd8fe 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -369,6 +369,12 @@ int main()
cmFailed("ELSEIF did not work");
#endif
+#ifdef CONDITIONAL_PARENTHESES
+ cmPassed("CONDITIONAL_PARENTHESES did work");
+#else
+ cmFailed("CONDITIONAL_PARENTHESES did not work");
+#endif
+
if(file2() != 1)
{
cmFailed("Call to file2 function from library failed.");
diff --git a/Tests/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in
index 8034203..d7952da 100644
--- a/Tests/Complex/cmTestConfigure.h.in
+++ b/Tests/Complex/cmTestConfigure.h.in
@@ -81,3 +81,7 @@
// test elseif
#cmakedefine ELSEIF_RESULT
+
+// test parenthesis in conditionals
+#cmakedefine CONDITIONAL_PARENTHESES
+
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 1814528..c3f94b7 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -336,6 +336,12 @@ if (NOT ELSEIF_RESULT EQUAL 2)
set (ELSEIF_RESULT 0)
endif (NOT ELSEIF_RESULT EQUAL 2)
+# test handling of parenthetical groups in conditionals
+if (2 GREATER 1 AND (4 LESS 3 OR 5 LESS 6) AND NOT (7 GREATER 8))
+ set(CONDITIONAL_PARENTHESES 1)
+endif()
+
+
#
# Configure file
# (plug vars to #define so that they can be tested)
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 95e77b6..0ecd8fe 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -369,6 +369,12 @@ int main()
cmFailed("ELSEIF did not work");
#endif
+#ifdef CONDITIONAL_PARENTHESES
+ cmPassed("CONDITIONAL_PARENTHESES did work");
+#else
+ cmFailed("CONDITIONAL_PARENTHESES did not work");
+#endif
+
if(file2() != 1)
{
cmFailed("Call to file2 function from library failed.");
diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in
index 8034203..d7952da 100644
--- a/Tests/ComplexOneConfig/cmTestConfigure.h.in
+++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in
@@ -81,3 +81,7 @@
// test elseif
#cmakedefine ELSEIF_RESULT
+
+// test parenthesis in conditionals
+#cmakedefine CONDITIONAL_PARENTHESES
+
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index 1814528..c3f94b7 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/Tests/ComplexRelativePaths/CMakeLists.txt
@@ -336,6 +336,12 @@ if (NOT ELSEIF_RESULT EQUAL 2)
set (ELSEIF_RESULT 0)
endif (NOT ELSEIF_RESULT EQUAL 2)
+# test handling of parenthetical groups in conditionals
+if (2 GREATER 1 AND (4 LESS 3 OR 5 LESS 6) AND NOT (7 GREATER 8))
+ set(CONDITIONAL_PARENTHESES 1)
+endif()
+
+
#
# Configure file
# (plug vars to #define so that they can be tested)
diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx
index 95e77b6..0ecd8fe 100644
--- a/Tests/ComplexRelativePaths/Executable/complex.cxx
+++ b/Tests/ComplexRelativePaths/Executable/complex.cxx
@@ -369,6 +369,12 @@ int main()
cmFailed("ELSEIF did not work");
#endif
+#ifdef CONDITIONAL_PARENTHESES
+ cmPassed("CONDITIONAL_PARENTHESES did work");
+#else
+ cmFailed("CONDITIONAL_PARENTHESES did not work");
+#endif
+
if(file2() != 1)
{
cmFailed("Call to file2 function from library failed.");
diff --git a/Tests/ComplexRelativePaths/cmTestConfigure.h.in b/Tests/ComplexRelativePaths/cmTestConfigure.h.in
index 8034203..d7952da 100644
--- a/Tests/ComplexRelativePaths/cmTestConfigure.h.in
+++ b/Tests/ComplexRelativePaths/cmTestConfigure.h.in
@@ -81,3 +81,7 @@
// test elseif
#cmakedefine ELSEIF_RESULT
+
+// test parenthesis in conditionals
+#cmakedefine CONDITIONAL_PARENTHESES
+