From 7de868c4d7c8bfe35d201ed480328f3177a1325b Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 23 Sep 2015 09:07:20 -0400 Subject: [PATCH] Tests: Simplify GeneratorExpression check implementation Use a function instead of a macro so we do not need an extra layer of backslashes. Use a bracket argument to avoid another layer of extra backslashes. --- Tests/GeneratorExpression/check-common.cmake | 4 ++-- Tests/GeneratorExpression/check-part1.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/GeneratorExpression/check-common.cmake b/Tests/GeneratorExpression/check-common.cmake index 8ffebd740..faf5d4f16 100644 --- a/Tests/GeneratorExpression/check-common.cmake +++ b/Tests/GeneratorExpression/check-common.cmake @@ -1,5 +1,5 @@ -macro(check var val) +function(check var val) if(NOT "${${var}}" STREQUAL "${val}") message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"") endif() -endmacro() +endfunction() diff --git a/Tests/GeneratorExpression/check-part1.cmake b/Tests/GeneratorExpression/check-part1.cmake index 3207582cf..60b193f58 100644 --- a/Tests/GeneratorExpression/check-part1.cmake +++ b/Tests/GeneratorExpression/check-part1.cmake @@ -55,5 +55,5 @@ check(test_semicolon ";") check(test_colons_1 ":") check(test_colons_2 "::") check(test_colons_3 "Qt5::Core") -check(test_colons_4 "C:\\\\CMake") +check(test_colons_4 [[C:\CMake]]) check(test_colons_5 "C:/CMake")