<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<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>&gt; Date: Sun, 1 Nov 2009 22:47:36 +0100<br>&gt; Subject: Re: [CMake] add_executable with -D<br>&gt; From: pgquiles@elpauer.org<br>&gt; To: aditya15417@hotmail.com<br>&gt; CC: cmake@cmake.org<br>&gt; <br>&gt; Hello,<br>&gt; <br>&gt; $ cmake --help-command IF<br>&gt; <br>&gt;          if(expression)<br>&gt;            # then section.<br>&gt;            COMMAND1(ARGS ...)<br>&gt;            COMMAND2(ARGS ...)<br>&gt;            ...<br>&gt;          elseif(expression2)<br>&gt;            # elseif section.<br>&gt;            COMMAND1(ARGS ...)<br>&gt;            COMMAND2(ARGS ...)<br>&gt;            ...<br>&gt;          else(expression)<br>&gt;            # else section.<br>&gt;            COMMAND1(ARGS ...)<br>&gt;            COMMAND2(ARGS ...)<br>&gt;            ...<br>&gt;          endif(expression)<br>&gt; <br>&gt; [...]<br>&gt; <br>&gt; It seems that you don't know CMake at all. You may want to take a look<br>&gt; at my slides:<br>&gt; <br>&gt; http://www.elpauer.org/stuff/learning_cmake.pdf<br>&gt; <br>&gt; <br>&gt; On Sun, Nov 1, 2009 at 10:39 PM, Alex H &lt;aditya15417@hotmail.com&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; How can I do an if else statement in CMake?? Do I need to use options?<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; From: mike.jackson@bluequartz.net<br>&gt; &gt; To: aditya15417@hotmail.com<br>&gt; &gt; Subject: Re: [CMake] add_executable with -D<br>&gt; &gt; Date: Sun, 1 Nov 2009 13:59:15 -0500<br>&gt; &gt; CC: cmake@cmake.org<br>&gt; &gt;<br>&gt; &gt; You need to use the add_defintions() command<br>&gt; &gt;<br>&gt; &gt; Sent from my iPod<br>&gt; &gt; Mike Jackson<br>&gt; &gt; On Nov 1, 2009, at 13:12, Alex H &lt;aditya15417@hotmail.com&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; Usually using g++ I can do the following:<br>&gt; &gt; g++ -D DEBUG main.cpp<br>&gt; &gt; how can I add the similar function of -D DEBUG in CMake?<br>&gt; &gt; I tried to read the add_executable() command and it did not provide<br>&gt; &gt; something similar to this.. some guidelines are appreciated<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Chat online and in real-time with friends and family! Windows Live Messenger<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the CMake FAQ at:<br>&gt; &gt; http://www.cmake.org/Wiki/CMake_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.cmake.org/mailman/listinfo/cmake<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Windows Live Hotmail: Your friends can get your Facebook updates, right from<br>&gt; &gt; HotmailŪ.<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the CMake FAQ at:<br>&gt; &gt; http://www.cmake.org/Wiki/CMake_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.cmake.org/mailman/listinfo/cmake<br>&gt; &gt;<br>&gt; <br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Pau Garcia i Quiles<br>&gt; http://www.elpauer.org<br>&gt; (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></body>
</html>