<html><body bgcolor="#FFFFFF"><div>Cmake -DCMAKE_INSTALL_PREFIX=/use/myproject ../</div><div><br></div><div><br></div><div>Mike Jackson<br><br>Sent from my iPod</div><div><br>On Nov 1, 2009, at 16:51, Alex H <<a href="mailto:aditya15417@hotmail.com">aditya15417@hotmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>
<br>Sorry what I was trying to ask is, how do I run CMake with an option that I have defined in the option section of<div>CMakeLists.txt?<br><div></div><br><br><br><br>> Date: Sun, 1 Nov 2009 22:47:36 +0100<br>> Subject: Re: [CMake] add_executable with -D<br>> From: <a href="mailto:pgquiles@elpauer.org"><a href="mailto:pgquiles@elpauer.org">pgquiles@elpauer.org</a></a><br>> To: <a href="mailto:aditya15417@hotmail.com"><a href="mailto:aditya15417@hotmail.com">aditya15417@hotmail.com</a></a><br>> CC: <a href="mailto:cmake@cmake.org"><a href="mailto:cmake@cmake.org">cmake@cmake.org</a></a><br>> <br>> Hello,<br>> <br>> $ cmake --help-command IF<br>> <br>> if(expression)<br>> # then section.<br>> COMMAND1(ARGS ...)<br>> COMMAND2(ARGS ...)<br>> ...<br>> elseif(expression2)<br>> # elseif section.<br>> COMMAND1(ARGS ...)<br>> COMMAND2(ARGS ...)<br>> ...<br>> else(expression)<br>> # else section.<br>> COMMAND1(ARGS ...)<br>> COMMAND2(ARGS ...)<br>> ...<br>> endif(expression)<br>> <br>> [...]<br>> <br>> It seems that you don't know CMake at all. You may want to take a look<br>> at my slides:<br>> <br>> <a href="http://www.elpauer.org/stuff/learning_cmake.pdf"><a href="http://www.elpauer.org/stuff/learning_cmake.pdf">http://www.elpauer.org/stuff/learning_cmake.pdf</a></a><br>> <br>> <br>> On Sun, Nov 1, 2009 at 10:39 PM, Alex H <<a href="mailto:aditya15417@hotmail.com">aditya15417@hotmail.com</a>> wrote:<br>> ><br>> > How can I do an if else statement in CMake?? Do I need to use options?<br>> >><br>> ><br>> ><br>> > ________________________________<br>> > From: <a href="mailto:mike.jackson@bluequartz.net"><a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a></a><br>> > To: <a href="mailto:aditya15417@hotmail.com"><a href="mailto:aditya15417@hotmail.com">aditya15417@hotmail.com</a></a><br>> > Subject: Re: [CMake] add_executable with -D<br>> > Date: Sun, 1 Nov 2009 13:59:15 -0500<br>> > CC: <a href="mailto:cmake@cmake.org"><a href="mailto:cmake@cmake.org">cmake@cmake.org</a></a><br>> ><br>> > You need to use the add_defintions() command<br>> ><br>> > Sent from my iPod<br>> > Mike Jackson<br>> > On Nov 1, 2009, at 13:12, Alex H <<a href="mailto:aditya15417@hotmail.com">aditya15417@hotmail.com</a>> wrote:<br>> ><br>> > Usually using g++ I can do the following:<br>> > g++ -D DEBUG main.cpp<br>> > how can I add the similar function of -D DEBUG in CMake?<br>> > I tried to read the add_executable() command and it did not provide<br>> > something similar to this.. some guidelines are appreciated<br>> ><br>> ><br>> ><br>> > ________________________________<br>> > Chat online and in real-time with friends and family! Windows Live Messenger<br>> ><br>> > _______________________________________________<br>> > Powered by <a href="http://www.kitware.com"><a href="http://www.kitware.com">www.kitware.com</a></a><br>> ><br>> > Visit other Kitware open-source projects at<br>> > <a href="http://www.kitware.com/opensource/opensource.html"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></a><br>> ><br>> > Please keep messages on-topic and check the CMake FAQ at:<br>> > <a href="http://www.cmake.org/Wiki/CMake_FAQ"><a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></a><br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > <a href="http://www.cmake.org/mailman/listinfo/cmake"><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></a><br>> ><br>> > ________________________________<br>> > Windows Live Hotmail: Your friends can get your Facebook updates, right from<br>> > HotmailĀ®.<br>> > _______________________________________________<br>> > Powered by <a href="http://www.kitware.com"><a href="http://www.kitware.com">www.kitware.com</a></a><br>> ><br>> > Visit other Kitware open-source projects at<br>> > <a href="http://www.kitware.com/opensource/opensource.html"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></a><br>> ><br>> > Please keep messages on-topic and check the CMake FAQ at:<br>> > <a href="http://www.cmake.org/Wiki/CMake_FAQ"><a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></a><br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > <a href="http://www.cmake.org/mailman/listinfo/cmake"><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></a><br>> ><br>> <br>> <br>> <br>> -- <br>> Pau Garcia i Quiles<br>> <a href="http://www.elpauer.org"><a href="http://www.elpauer.org">http://www.elpauer.org</a></a><br>> (Due to my workload, I may need 10 days to answer)<br></div>                                            <br><hr>Chat online and in real-time with friends and family! <a href="http://get.live.com/messenger/overview" target="_new">Windows Live Messenger</a>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Powered by <a href="http://www.kitware.com"><a href="http://www.kitware.com">www.kitware.com</a></a></span><br><span></span><br><span>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></a></span><br><span></span><br><span>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ"><a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></span></div></blockquote></body></html>