summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2022-08-17 16:37:42 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-17 19:44:35 (GMT)
commitb976b844d28989cd3298115c25b3d89888785388 (patch)
treee80b1e2c195450a32a9d639e829615b5fc19e907 /Tests
parent24c83bb35b9747bd92dff40dd948b2bd90219833 (diff)
downloadCMake-b976b844d28989cd3298115c25b3d89888785388.zip
CMake-b976b844d28989cd3298115c25b3d89888785388.tar.gz
CMake-b976b844d28989cd3298115c25b3d89888785388.tar.bz2
try_compile: Don't accept try_run arguments
Modify cmCoreTryCompile to only recognize try_run arguments when actually parsing try_run. (The old behavior was to recognize try_run arguments for try_compile also and then complain.) This has a small chance that a try_run keyword will be consumed as part of a multi-valued keyword argument. However, this behavior is more consistent with other commands, as we don't normally treat keywords as universally reserved. Also, the code is noticeably simplified.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/try_compile/TryRunArgs-stderr.txt21
1 files changed, 13 insertions, 8 deletions
diff --git a/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt b/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt
index 717c208..2a58e71 100644
--- a/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt
+++ b/Tests/RunCMake/try_compile/TryRunArgs-stderr.txt
@@ -1,13 +1,18 @@
^CMake Warning \(dev\) at TryRunArgs.cmake:[0-9]+ \(try_compile\):
- Ignoring try_run arguments for try_compile:
-
- COMPILE_OUTPUT_VARIABLE
- RUN_OUTPUT_VARIABLE
- RUN_OUTPUT_STDOUT_VARIABLE
- RUN_OUTPUT_STDERR_VARIABLE
- WORKING_DIRECTORY
- ARGS
+ Unknown arguments:
+ "COMPILE_OUTPUT_VARIABLE"
+ "compOutputVar"
+ "RUN_OUTPUT_VARIABLE"
+ "runOutputVar"
+ "RUN_OUTPUT_STDOUT_VARIABLE"
+ "runOutputStdOutVar"
+ "RUN_OUTPUT_STDERR_VARIABLE"
+ "runOutputStdErrVar"
+ "WORKING_DIRECTORY"
+ "runWorkDir"
+ "ARGS"
+ "runArgs"
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.$