<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>> Date: Sun, 1 Nov 2009 22:47:36 +0100<br>> Subject: Re: [CMake] add_executable with -D<br>> From: pgquiles@elpauer.org<br>> To: aditya15417@hotmail.com<br>> CC: cmake@cmake.org<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>> http://www.elpauer.org/stuff/learning_cmake.pdf<br>> <br>> <br>> On Sun, Nov 1, 2009 at 10:39 PM, Alex H <aditya15417@hotmail.com> 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: mike.jackson@bluequartz.net<br>> > To: aditya15417@hotmail.com<br>> > Subject: Re: [CMake] add_executable with -D<br>> > Date: Sun, 1 Nov 2009 13:59:15 -0500<br>> > CC: cmake@cmake.org<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 <aditya15417@hotmail.com> 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 www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the CMake FAQ at:<br>> > http://www.cmake.org/Wiki/CMake_FAQ<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.cmake.org/mailman/listinfo/cmake<br>> ><br>> > ________________________________<br>> > Windows Live Hotmail: Your friends can get your Facebook updates, right from<br>> > HotmailŪ.<br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the CMake FAQ at:<br>> > http://www.cmake.org/Wiki/CMake_FAQ<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.cmake.org/mailman/listinfo/cmake<br>> ><br>> <br>> <br>> <br>> -- <br>> Pau Garcia i Quiles<br>> http://www.elpauer.org<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></body>
</html>