summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ToolchainFile/CallProject-stderr.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-07 18:31:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-07 18:52:38 (GMT)
commit72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b (patch)
treec4011b95d6067e77f6074026d4ad9d5b381eee5b /Tests/RunCMake/ToolchainFile/CallProject-stderr.txt
parent8256d021c8324779c7269658a094848ebeafb82e (diff)
downloadCMake-72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b.zip
CMake-72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b.tar.gz
CMake-72e0dc58d3caf63a57975e97ce13c5dc4b38cf9b.tar.bz2
Diagnose recursive project/enable_language without crashing (#15999)
Calling `project()` or `enable_language()` from a toolchain file will infinitely recurse since those commands load the toolchain file. Diagnose and reject this case with an error message instead of crashing when the stack eventually overflows.
Diffstat (limited to 'Tests/RunCMake/ToolchainFile/CallProject-stderr.txt')
-rw-r--r--Tests/RunCMake/ToolchainFile/CallProject-stderr.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/ToolchainFile/CallProject-stderr.txt b/Tests/RunCMake/ToolchainFile/CallProject-stderr.txt
new file mode 100644
index 0000000..e2b9f1b
--- /dev/null
+++ b/Tests/RunCMake/ToolchainFile/CallProject-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at CallProject-toolchain.cmake:[0-9]+ \(project\):
+ Language 'NONE' is currently being enabled. Recursive call not allowed.
+Call Stack \(most recent call first\):
+ .*/Modules/CMakeDetermineSystem.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(project\)$