From 1ec1bf9f071ce930094171ab45f2dbc02c57927b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 18 May 2015 00:00:53 +0200 Subject: [PATCH] if(): Test the effect of cmMakefileCall use in elseif() handling. --- Tests/RunCMake/if/RunCMakeTest.cmake | 1 + Tests/RunCMake/if/elseif-message-result.txt | 1 + Tests/RunCMake/if/elseif-message-stderr.txt | 8 ++++++++ Tests/RunCMake/if/elseif-message.cmake | 4 ++++ 4 files changed, 14 insertions(+) create mode 100644 Tests/RunCMake/if/elseif-message-result.txt create mode 100644 Tests/RunCMake/if/elseif-message-stderr.txt create mode 100644 Tests/RunCMake/if/elseif-message.cmake diff --git a/Tests/RunCMake/if/RunCMakeTest.cmake b/Tests/RunCMake/if/RunCMakeTest.cmake index 6b6b74b54..b5546a7ee 100644 --- a/Tests/RunCMake/if/RunCMakeTest.cmake +++ b/Tests/RunCMake/if/RunCMakeTest.cmake @@ -2,3 +2,4 @@ include(RunCMake) run_cmake(IsDirectory) run_cmake(IsDirectoryLong) +run_cmake(elseif-message) diff --git a/Tests/RunCMake/if/elseif-message-result.txt b/Tests/RunCMake/if/elseif-message-result.txt new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/Tests/RunCMake/if/elseif-message-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/if/elseif-message-stderr.txt b/Tests/RunCMake/if/elseif-message-stderr.txt new file mode 100644 index 000000000..c73977c42 --- /dev/null +++ b/Tests/RunCMake/if/elseif-message-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at elseif-message.cmake:[0-9]+ \(elseif\): + given arguments: + + "Unknown" "arguments" + + Unknown arguments specified +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/if/elseif-message.cmake b/Tests/RunCMake/if/elseif-message.cmake new file mode 100644 index 000000000..593096610 --- /dev/null +++ b/Tests/RunCMake/if/elseif-message.cmake @@ -0,0 +1,4 @@ + +if (0) +elseif(Unknown arguments) +endif()