summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-16 13:20:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-16 13:23:42 (GMT)
commite1d124286ab662d666e241bc0948445a8c26c817 (patch)
treecbb15f8530b2fb1395486950f1810abfe64979af /Tests/RunCMake
parent0bdaa60e43f9e7321cede059a9a6013608b45e56 (diff)
parent06a9a3bdc3cde5f4bf766771815e95d8e5a8aa62 (diff)
downloadCMake-e1d124286ab662d666e241bc0948445a8c26c817.zip
CMake-e1d124286ab662d666e241bc0948445a8c26c817.tar.gz
CMake-e1d124286ab662d666e241bc0948445a8c26c817.tar.bz2
Merge topic 'file-configure-angle-brackets' into release-3.19
06a9a3bdc3 file(CONFIGURE): Allow angle brackets in content Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5379
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt1
-rw-r--r--Tests/RunCMake/File_Configure/AngleBracketsContent.cmake6
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt1
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake4
-rw-r--r--Tests/RunCMake/File_Configure/RunCMakeTest.cmake2
6 files changed, 8 insertions, 11 deletions
diff --git a/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt b/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt
new file mode 100644
index 0000000..08c2ada
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt
@@ -0,0 +1 @@
+^foo-\$<CONFIG>$
diff --git a/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake b/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake
new file mode 100644
index 0000000..04c63bb
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake
@@ -0,0 +1,6 @@
+file(CONFIGURE
+ OUTPUT "file.txt"
+ CONTENT "foo-$<CONFIG>"
+)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/file.txt out)
+message("${out}")
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
deleted file mode 100644
index acda654..0000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at BadArgGeneratorExpressionContent.cmake:[0-9]+ \(file\):
- file CONFIGURE called with CONTENT containing a "<". This character is not
- allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
deleted file mode 100644
index 75fe9e5..0000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-file(CONFIGURE
- OUTPUT "file.txt"
- CONTENT "foo-$<CONFIG>"
-)
diff --git a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
index 0337014..e79de79 100644
--- a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
include(RunCMake)
+run_cmake(AngleBracketsContent)
run_cmake(BadArg)
-run_cmake(BadArgGeneratorExpressionContent)
run_cmake(BadArgGeneratorExpressionOutput)
run_cmake(DirOutput)
run_cmake(NewLineStyle-NoArg)