diff options
| author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-06-22 08:13:26 (GMT) |
|---|---|---|
| committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-06-22 08:13:26 (GMT) |
| commit | c96f43b7dd1d41379fe63b4e8b508b2b034520b6 (patch) | |
| tree | 822a5c6eeb9b26fb1ddc723c8de43685b196b9e8 /Tests/RunCMake/include_guard/Scripts/DirScript.cmake | |
| parent | 80f1221f5088bb7ea7864a819c36d03e96f21155 (diff) | |
| download | CMake-c96f43b7dd1d41379fe63b4e8b508b2b034520b6.zip CMake-c96f43b7dd1d41379fe63b4e8b508b2b034520b6.tar.gz CMake-c96f43b7dd1d41379fe63b4e8b508b2b034520b6.tar.bz2 | |
include_guard: add tests for the feature
Diffstat (limited to 'Tests/RunCMake/include_guard/Scripts/DirScript.cmake')
| -rw-r--r-- | Tests/RunCMake/include_guard/Scripts/DirScript.cmake | 12 |
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() |
