<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>De: </b>"Marc CHEVRIER" <marc.chevrier@sap.com><br><b>À: </b>"Franck Houssen" <franck.houssen@inria.fr>, "CMake Mail List" <cmake@cmake.org><br><b>Envoyé: </b>Mardi 9 Janvier 2018 10:29:30<br><b>Objet: </b>Re: [CMake] configure_file: escaping (single) quotes<br><div><br></div><div class="WordSection1"><p class="MsoNormal"><span style="mso-fareast-language:EN-US" data-mce-style="mso-fareast-language: EN-US;">The problem comes from CMake evaluating variable VAR (i.e. expression ${VAR…}) and detect wrong syntax.</span></p><p class="MsoNormal"><span style="mso-fareast-language:EN-US" data-mce-style="mso-fareast-language: EN-US;">The solution is to specify option @ONLY to command configure_file to avoid ${} evaluation.</span></p></div></blockquote><div><br></div><div>The line after VAR is something like:<br></div><div><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">VAR="${VAR//</span><strong><span style="font-size: 12.0pt; color: red;" data-mce-style="font-size: 12.0pt; color: red;">'</span></strong><span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">#</span><strong><span style="font-size: 12.0pt; color: red;" data-mce-style="font-size: 12.0pt; color: red;">'</span></strong><span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">/}"</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">CMD="mpirun -n ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS}"</span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;"><br></span></p><p style="margin: 0px;" data-mce-style="margin: 0px;"><span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">I need <span style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">MPIEXEC_</span>* to be replaced. So, I need to use @ONLY and set all MPIEXEC variables with @ (but not $). Correct ?<br></span></p></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div class="WordSection1"><p class="MsoNormal"><span style="mso-fareast-language:EN-US" data-mce-style="mso-fareast-language: EN-US;"> </span></p><p class="MsoNormal"><span style="mso-fareast-language:EN-US" data-mce-style="mso-fareast-language: EN-US;"> </span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm" data-mce-style="border: none; border-top: solid #B5C4DF 1.0pt; padding: 3.0pt 0cm 0cm 0cm;"><p class="MsoNormal"><b><span style="font-size:12.0pt;color:black" data-mce-style="font-size: 12.0pt; color: black;">From: </span></b><span style="font-size:12.0pt;color:black" data-mce-style="font-size: 12.0pt; color: black;">CMake <cmake-bounces@cmake.org> on behalf of Franck Houssen <franck.houssen@inria.fr><br> <b>Date: </b>Tuesday 9 January 2018 at 10:24<br> <b>To: </b>CMake Mail List <cmake@cmake.org><br> <b>Subject: </b>[CMake] configure_file: escaping (single) quotes</span></p></div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">VAR="${VAR//</span><strong><span style="font-size:12.0pt;color:red" data-mce-style="font-size: 12.0pt; color: red;">'</span></strong><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">#</span><strong><span style="font-size:12.0pt;color:red" data-mce-style="font-size: 12.0pt; color: red;">'</span></strong><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black" data-mce-style="font-size: 12.0pt; font-family: 'Times New Roman',serif; color: black;">/}"</span></p></div></blockquote><div><br></div></div></body></html>