summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_guard/Scripts/GlobScript.cmake
blob: c26bf40e82418a9a64e0f98f682d43f7ee233957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
include_guard(GLOBAL)

set(prop_name GLOB_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()