summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_guard/Scripts/DirScript.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/include_guard/Scripts/DirScript.cmake')
-rw-r--r--Tests/RunCMake/include_guard/Scripts/DirScript.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/include_guard/Scripts/DirScript.cmake b/Tests/RunCMake/include_guard/Scripts/DirScript.cmake
new file mode 100644
index 0000000..e61d180
--- /dev/null
+++ b/Tests/RunCMake/include_guard/Scripts/DirScript.cmake
@@ -0,0 +1,12 @@
+include_guard(DIRECTORY)
+
+set(prop_name DIR_SCRIPT_COUNT)
+get_property(count_is_set GLOBAL PROPERTY ${prop_name} SET)
+
+if(NOT count_is_set)
+ set_property(GLOBAL PROPERTY ${prop_name} 1)
+else()
+ get_property(count GLOBAL PROPERTY ${prop_name})
+ math(EXPR count "${count} + 1")
+ set_property(GLOBAL PROPERTY ${prop_name} ${count})
+endif()