Files
CMake/Tests/RunCMake/File_Configure/DirOutput.cmake
Leander Beernaert a6fee09484 file: Add CONFIGURE subcommand
Extend the `file()` command with a new `CONFIGURE` subcommand that
behaves the same as `string(CONFIGURE)` except that it writes the
resulting output immediately to a file.

Fixes: #20388
2020-03-09 11:54:02 -04:00

5 lines
184 B
CMake

file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DirOutput)
configure_file(DirOutput.txt DirOutput)
file(READ ${CMAKE_CURRENT_BINARY_DIR}/DirOutput/DirOutput.txt out)
message("${out}")