variable_watch: Add test for MODIFIED_ACCESS report

Add a RunCMake.variable_watch watch test to cover the basic use case.
This commit is contained in:
Brad King 2013-06-03 09:23:25 -04:00
parent 3d5bb381be
commit c63d30048b
5 changed files with 13 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 2.8)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)

View File

@ -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

View File

@ -0,0 +1,3 @@
set(b "a")
variable_watch(b)
set(b "b")

View File

@ -0,0 +1,3 @@
include(RunCMake)
run_cmake(ModifiedAccess)