I'm sorry if this seems like a noob question but I have problems understanding this command properly and Google didn't help me.
Say I have this CMake script:
set (OUTDIR ${CMAKE_CURRENT_BINARY_DIR}/MyFolder) string (REGEX REPLACE "/" "\" OUTDIR ${OUTDIR})
I found a similar example in a book. I tried reading the explanation there along with the documentation but it's still not entirely clear to me what that snippet does. As I understand from the documentation: REGER REPLACE will replace "/" with "\" every time it finds it and returns the result in the output. So in this case the output would be what? The 'OUTDIR' folder which is the path defined above with set? I do not understand why it's 'OUTDIR ${OUTDIR}' and not simply '${OUTDIR}'. Please help me clear this confusion by explaining that snippet. Thank you