VariableWatchTest.cmake.in 469 B

12345678910111213141516171819202122
  1. MESSAGE("Start")
  2. VARIABLE_WATCH(TESTVAR MESSAGE)
  3. VARIABLE_WATCH(TESTVAR1)
  4. macro(testwatch var access file stack)
  5. MESSAGE("There was a ${access} access done on the variable: ${var} in file ${file}")
  6. MESSAGE("List file stack is: ${stack}")
  7. endmacro(testwatch)
  8. VARIABLE_WATCH(somevar testwatch)
  9. set(TESTVAR1 "1")
  10. set(TESTVAR "1")
  11. set(TESTVAR1 "0")
  12. set(TESTVAR "0")
  13. message("Variable: ${somevar}")
  14. set(somevar "1")
  15. message("Variable: ${somevar}")
  16. remove(somevar)