diff options
author | Brad King <brad.king@kitware.com> | 2013-06-03 13:23:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-06-03 14:20:31 (GMT) |
commit | c63d30048bcf5bd6efa1e038b36c5efd29e34749 (patch) | |
tree | 5eea1051d4090bdbe2d42124de0280d6158a33e4 /Tests | |
parent | 3d5bb381be16f67e4781c395bda2be12a5d00168 (diff) | |
download | CMake-c63d30048bcf5bd6efa1e038b36c5efd29e34749.zip CMake-c63d30048bcf5bd6efa1e038b36c5efd29e34749.tar.gz CMake-c63d30048bcf5bd6efa1e038b36c5efd29e34749.tar.bz2 |
variable_watch: Add test for MODIFIED_ACCESS report
Add a RunCMake.variable_watch watch test to cover the basic use case.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/variable_watch/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/variable_watch/ModifiedAccess.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/variable_watch/RunCMakeTest.cmake | 3 |
5 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index f1e01b1..86c9725 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -77,6 +77,7 @@ add_RunCMake_test(include) add_RunCMake_test(include_directories) add_RunCMake_test(list) add_RunCMake_test(try_compile) +add_RunCMake_test(variable_watch) add_RunCMake_test(CMP0004) find_package(Qt4 QUIET) diff --git a/Tests/RunCMake/variable_watch/CMakeLists.txt b/Tests/RunCMake/variable_watch/CMakeLists.txt new file mode 100644 index 0000000..e8db6b0 --- /dev/null +++ b/Tests/RunCMake/variable_watch/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt b/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt new file mode 100644 index 0000000..3287626 --- /dev/null +++ b/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt @@ -0,0 +1,3 @@ +\* Variable "b" was accessed using MODIFIED_ACCESS in: .*/Tests/RunCMake/variable_watch/ModifiedAccess.cmake + The value of the variable: "b" + The list file stack: .*/Tests/RunCMake/variable_watch/CMakeLists.txt;.*/Tests/RunCMake/variable_watch/ModifiedAccess.cmake diff --git a/Tests/RunCMake/variable_watch/ModifiedAccess.cmake b/Tests/RunCMake/variable_watch/ModifiedAccess.cmake new file mode 100644 index 0000000..87943b3 --- /dev/null +++ b/Tests/RunCMake/variable_watch/ModifiedAccess.cmake @@ -0,0 +1,3 @@ +set(b "a") +variable_watch(b) +set(b "b") diff --git a/Tests/RunCMake/variable_watch/RunCMakeTest.cmake b/Tests/RunCMake/variable_watch/RunCMakeTest.cmake new file mode 100644 index 0000000..1dd7688 --- /dev/null +++ b/Tests/RunCMake/variable_watch/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(ModifiedAccess) |