I want to have a cmake target that updates a specific file. I tried following but it seems that I cannot put all what I want into a custom target.
ADD_CUSTOM_TARGET(update
file(READ "file.h" myFile)
string(REPLACE "originalString" "newString" myFile"${myFile}"))
)
I'm quite new to cmake so I may be missing something basic. How could I update the file on request ?