浏览代码

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.
Brad King 10 年之前
父节点
当前提交
7de868c4d7
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      Tests/GeneratorExpression/check-common.cmake
  2. 1 1
      Tests/GeneratorExpression/check-part1.cmake

+ 2 - 2
Tests/GeneratorExpression/check-common.cmake

@@ -1,5 +1,5 @@
-macro(check var val)
+function(check var val)
   if(NOT "${${var}}" STREQUAL "${val}")
   if(NOT "${${var}}" STREQUAL "${val}")
     message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"")
     message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"")
   endif()
   endif()
-endmacro()
+endfunction()

+ 1 - 1
Tests/GeneratorExpression/check-part1.cmake

@@ -55,5 +55,5 @@ check(test_semicolon ";")
 check(test_colons_1 ":")
 check(test_colons_1 ":")
 check(test_colons_2 "::")
 check(test_colons_2 "::")
 check(test_colons_3 "Qt5::Core")
 check(test_colons_3 "Qt5::Core")
-check(test_colons_4 "C:\\\\CMake")
+check(test_colons_4 [[C:\CMake]])
 check(test_colons_5 "C:/CMake")
 check(test_colons_5 "C:/CMake")