1 2 3 4 5 6 7
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" CONTENT "int main() { return 0; }\n" NEWLINE_STYLE FOO )