<div dir="ltr">Eric, thanks, I figured it out.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 13, 2016 at 3:27 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2016-10-13 21:18 GMT+02:00 Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>Hello,<br><br></div>I have a     <a href="http://foo.h.cmake.in" target="_blank">foo.h.cmake.in</a>     file that I am using to generate a      foo_config.h    file.<br><br></div><div>Here is the line in my cmake file that generates the header:<br></div><div><br>configure_file(${CMAKE_CURRENT<wbr>_SOURCE_DIR}/<a href="http://foo.h.cmake.in" target="_blank">foo.h.cmake.in</a><br>  ${CMAKE_CURRENT_BINARY_DIR}/fo<wbr>o_config.h @ONLY)<br></div></div></div></div></div></div></div></div></blockquote><div><br></div><div><br></div></span><div>You specified @ONLY option which means that only @VARNAME@ will be processed</div><div>and not ${VARNAME}</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><br><br></div>I would like to define or undefine DEFINE  in the config file <br>based on some cmake variables.<br><br><br></div>Here is my line in the <a href="http://foo.h.cmake.in" target="_blank">foo.h.cmake.in</a> file:<br><br>#cmakedefine FOO_DEFINE ${SOME_CMAKE_VARIABLE}<br></div></div></div></div></div></div></blockquote><div><br></div></span><div>Either you drop the @ONLY option of configure_file or you write</div><div><br></div><div>#cmakedefine FOO_DEFINE @SOME_CMAKE_VARIABLE@<br></div><div><br></div><div>and you should get what you want.</div><div>@ONLY is very useful when you configure some kind of shell script template</div><div>where $ shoudn't be interpreted by CMake condigure_file because it's meant to kept</div><div>as is in the resulting configured file.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><div dir="ltr"><div><div><div><div><div><br><br></div>However, I only get <br><br></div>#define FOO_DEFINE ${SOME_CMAKE_VARIABLE}<br><br></div>in the foo_config.h file.<br><br><br></div>Thanks,<br></div>Aaron<br><div><div><div><div><div><br><br><br><br><div><br></div></div></div></div></div></div></div>
<br></span>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-641890737019955740gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div>