From 5f8466980696cc13653766d6c6255c40a896acb7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 11 Jul 2019 10:56:38 -0400 Subject: Tests: Factor out RunCMake.project helper macro into module --- Tests/RunCMake/project/CMP0048-NEW.cmake | 7 +------ Tests/RunCMake/project/PrintVersions.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 Tests/RunCMake/project/PrintVersions.cmake 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() -- cgit v0.12