summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-07 12:27:49 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-07 12:28:02 (GMT)
commitcf78a7df952a8d7be4228cb1c4a4b38ebc63dae8 (patch)
treec127a5b758ed4e74b575687729043a50262055fc /Tests
parentbb8da283ce40d3bb06df348ea2820dd12213a2e1 (diff)
parent53a5aec89998a58dff53946b47426ea692c5ad8d (diff)
downloadCMake-cf78a7df952a8d7be4228cb1c4a4b38ebc63dae8.zip
CMake-cf78a7df952a8d7be4228cb1c4a4b38ebc63dae8.tar.gz
CMake-cf78a7df952a8d7be4228cb1c4a4b38ebc63dae8.tar.bz2
Merge topic 'fix-double-warn-uninitialized-in-script-mode'
53a5aec899 CMP0053: Fix double warning on uninitialized variables in -P mode f92f93467e cmMakefile: Rename SuppressWatches to SuppressSideEffects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2565
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/warn-uninitialized.cmake1
3 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index b47abfb..ef48852 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -348,6 +348,10 @@ set(RunCMake_TEST_OPTIONS --trace-expand --warn-uninitialized)
run_cmake(trace-expand-warn-uninitialized)
unset(RunCMake_TEST_OPTIONS)
+set(RunCMake_TEST_OPTIONS --warn-uninitialized)
+run_cmake(warn-uninitialized)
+unset(RunCMake_TEST_OPTIONS)
+
set(RunCMake_TEST_OPTIONS --trace-source=trace-only-this-file.cmake)
run_cmake(trace-source)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt b/Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt
new file mode 100644
index 0000000..a13402a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning \(dev\) at warn-uninitialized.cmake:1 \(set\):
+ uninitialized variable 'WARN_FROM_NORMAL_CMAKE_FILE'
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CommandLine/warn-uninitialized.cmake b/Tests/RunCMake/CommandLine/warn-uninitialized.cmake
new file mode 100644
index 0000000..f1a75c9
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/warn-uninitialized.cmake
@@ -0,0 +1 @@
+set(FOO "${WARN_FROM_NORMAL_CMAKE_FILE}")