diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2021-01-29 10:57:03 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2021-01-29 13:25:33 (GMT) |
commit | 6e225efd8cd1c20bd45c062b168d79a6addb78e5 (patch) | |
tree | 6dbb81a6e9e86bf0717485430d0dba44a0980384 /Tests/RunCMake/File_Configure | |
parent | 59b5b6e11c243e4d45e57caf939107ef9fc44c75 (diff) | |
download | CMake-6e225efd8cd1c20bd45c062b168d79a6addb78e5.zip CMake-6e225efd8cd1c20bd45c062b168d79a6addb78e5.tar.gz CMake-6e225efd8cd1c20bd45c062b168d79a6addb78e5.tar.bz2 |
file(CONFIGURE): Fix newlines in CONTENT
Fixes: #21749
Diffstat (limited to 'Tests/RunCMake/File_Configure')
-rw-r--r-- | Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake b/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake index e384873..09aec45 100644 --- a/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake +++ b/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake @@ -1,10 +1,13 @@ set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt) function(test_eol style in out) + if (style) + set(newline_stle NEWLINE_STYLE ${style}) + endif() file(CONFIGURE OUTPUT ${file_name} CONTENT "@in@" - NEWLINE_STYLE ${style} + ${newline_stle} ) file(READ ${file_name} new HEX) if(NOT "${new}" STREQUAL "${out}") @@ -18,3 +21,5 @@ test_eol(CRLF "c" "630d0a") test_eol(UNIX "d" "640a") test_eol(LF "e" "650a") + +test_eol("" "a\nb" "610a62") |