summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/function/DummyMacro.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/function/DummyMacro.cmake')
-rw-r--r--Tests/RunCMake/function/DummyMacro.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/function/DummyMacro.cmake b/Tests/RunCMake/function/DummyMacro.cmake
new file mode 100644
index 0000000..1ab53e4
--- /dev/null
+++ b/Tests/RunCMake/function/DummyMacro.cmake
@@ -0,0 +1,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()