You’re wanting to add two separate items on the command-line, but you need to keep them together. To prevent CMake from de-duplicating the -warn part, you need the SHELL: prefix. I think the following should give you what you were looking for:
@craig.scott , @scivision Thank you very much. The :SHELL prefix however did not produce any effect, since the quotes are always present. However, the compiler now accepts the (quoted) extra option. Perhaps I have misconfigured some command in CMakeList.txt file before and I amended it without realizing.
Don’t try to force quotes, let CMake handle adding them where needed. The SHELL: prefix (note the colon comes after the word SHELL) is telling CMake “keep these arguments together and put them on the command line exactly the way I specify them”. This prevents CMake from de-duplicating the individual options, which would otherwise remove the -warn because you have another -warn option already.