Is there any way to define custom<br>
macro as given in following answer<br>
<a href="http://stackoverflow.com/questions/237542/learning-the-source-codes-filename-at-compile-time" target="_blank">http://stackoverflow.com/questions/237542/learning-the-source-codes-filename-at-compile-time</a><br>
with cmake<br><br><br clear="all">regards<div>Vivek Goel</div><br>
<br><br><div class="gmail_quote">On Tue, Dec 27, 2011 at 11:02 PM, Rolf Eike Beer <span dir="ltr"><<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am Dienstag, 27. Dezember 2011, 09:18:15 schrieb J Decker:<br>
<div class="im">> On Tue, Dec 27, 2011 at 1:42 AM, Rolf Eike Beer <<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>> wrote:<br>
> > Am Dienstag, 27. Dezember 2011, 14:58:32 schrieb vivek goel:<br>
> >> How can I make cmake to compile source with relative path ?<br>
> >><br>
> >> So that __FILE__ belongs to relative path of the file<br>
> >><br>
> >> or there is another way I can replace __FILE__ with some other variable ?<br>
><br>
> relative path to what? What is it you need the path to be?<br>
><br>
> > __FILE__ is implemented by the compiler, it has nothing to do with CMake.<br>
> > What<br>
> Well, it does have a little to do with CMake; the variable is the<br>
> filename passed to the compiler, which comes from cmake.<br>
<br>
</div>Yes, but the compiler is free to convert it to an absolute path or do whatever<br>
it wants with it.<br>
<span class="HOEnZb"><font color="#888888"><br>
Eike</font></span><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>