summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/function/DummyMacro.cmake
blob: 1ab53e419c953c400c07a9d246b0af4fff9df465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
macro(dummy)
  if(NOT CMAKE_CURRENT_FUNCTION STREQUAL "calling_macro")
    message(SEND_ERROR "Bad value of `CMAKE_CURRENT_FUNCTION`")
  endif()
  if(NOT CMAKE_CURRENT_FUNCTION_LIST_FILE MATCHES "^.*/function/CMAKE_CURRENT_FUNCTION.cmake$")
    message(SEND_ERROR "Bad value of `CMAKE_CURRENT_FUNCTION_LIST_FILE`")
  endif()
  if(NOT CMAKE_CURRENT_FUNCTION_LIST_FILE STREQUAL _THIS_FILE)
    message(SEND_ERROR "Bad value of `CMAKE_CURRENT_FUNCTION_LIST_FILE`")
  endif()
  if(NOT CMAKE_CURRENT_FUNCTION_LIST_DIR MATCHES "^.*/Tests/RunCMake/function$")
    message(SEND_ERROR "Bad value of `CMAKE_CURRENT_FUNCTION_LIST_DIR`")
  endif()
  if(NOT CMAKE_CURRENT_FUNCTION_LIST_LINE EQUAL 77)
    message(SEND_ERROR "Bad value of `CMAKE_CURRENT_FUNCTION_LIST_LINE`")
  endif()
  if(NOT CMAKE_CURRENT_FUNCTION_LIST_DIR STREQUAL _THIS_DIR)
    message(SEND_ERROR "Bad value of `CMAKE_CURRENT_FUNCTION_LIST_DIR`")
  endif()
endmacro()