diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-10-15 13:37:39 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-10-15 13:42:21 (GMT) |
commit | 06a9a3bdc3cde5f4bf766771815e95d8e5a8aa62 (patch) | |
tree | 189bd23208e0130860a1cee6a4f49fadb1a732f9 /Tests/RunCMake/File_Configure | |
parent | 85c2bb724f22b01e1b2f96b68ff73971c1638fbf (diff) | |
download | CMake-06a9a3bdc3cde5f4bf766771815e95d8e5a8aa62.zip CMake-06a9a3bdc3cde5f4bf766771815e95d8e5a8aa62.tar.gz CMake-06a9a3bdc3cde5f4bf766771815e95d8e5a8aa62.tar.bz2 |
file(CONFIGURE): Allow angle brackets in content
Fixes: #21306
Diffstat (limited to 'Tests/RunCMake/File_Configure')
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) |