1 2 3 4 5 6
file(CONFIGURE OUTPUT "file.txt" CONTENT "foo-$<CONFIG>" ) file(READ ${CMAKE_CURRENT_BINARY_DIR}/file.txt out) message("${out}")