summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/project
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-11 14:56:38 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-15 12:17:36 (GMT)
commit5f8466980696cc13653766d6c6255c40a896acb7 (patch)
tree41fb97c381151ad31fb072997837391371ce24d1 /Tests/RunCMake/project
parentb1f387a7ea2c5b42502970f5a6758d1880dee5ca (diff)
downloadCMake-5f8466980696cc13653766d6c6255c40a896acb7.zip
CMake-5f8466980696cc13653766d6c6255c40a896acb7.tar.gz
CMake-5f8466980696cc13653766d6c6255c40a896acb7.tar.bz2
Tests: Factor out RunCMake.project helper macro into module
Diffstat (limited to 'Tests/RunCMake/project')
-rw-r--r--Tests/RunCMake/project/CMP0048-NEW.cmake7
-rw-r--r--Tests/RunCMake/project/PrintVersions.cmake6
2 files changed, 7 insertions, 6 deletions
diff --git a/Tests/RunCMake/project/CMP0048-NEW.cmake b/Tests/RunCMake/project/CMP0048-NEW.cmake
index 7e16b70..b6e80ac 100644
--- a/Tests/RunCMake/project/CMP0048-NEW.cmake
+++ b/Tests/RunCMake/project/CMP0048-NEW.cmake
@@ -1,9 +1,4 @@
-macro(print_versions name)
- foreach(v "" _MAJOR _MINOR _PATCH _TWEAK)
- message(STATUS "PROJECT_VERSION${v}='${PROJECT_VERSION${v}}'")
- message(STATUS "${name}_VERSION${v}='${${name}_VERSION${v}}'")
- endforeach()
-endmacro()
+include(PrintVersions.cmake)
cmake_policy(SET CMP0048 NEW)
diff --git a/Tests/RunCMake/project/PrintVersions.cmake b/Tests/RunCMake/project/PrintVersions.cmake
new file mode 100644
index 0000000..ce1b25d
--- /dev/null
+++ b/Tests/RunCMake/project/PrintVersions.cmake
@@ -0,0 +1,6 @@
+macro(print_versions name)
+ foreach(v "" _MAJOR _MINOR _PATCH _TWEAK)
+ message(STATUS "PROJECT_VERSION${v}='${PROJECT_VERSION${v}}'")
+ message(STATUS "${name}_VERSION${v}='${${name}_VERSION${v}}'")
+ endforeach()
+endmacro()