[CMake] add_executable with -D
Mike Jackson
mike.jackson at bluequartz.net
Sun Nov 1 19:33:43 EST 2009
Cmake -DCMAKE_INSTALL_PREFIX=/use/myproject ../
Mike Jackson
Sent from my iPod
On Nov 1, 2009, at 16:51, Alex H <aditya15417 at hotmail.com> wrote:
>
> 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
> CMakeLists.txt?
>
>
>
>
> > Date: Sun, 1 Nov 2009 22:47:36 +0100
> > Subject: Re: [CMake] add_executable with -D
> > From: pgquiles at elpauer.org
> > To: aditya15417 at hotmail.com
> > CC: cmake at cmake.org
> >
> > Hello,
> >
> > $ cmake --help-command IF
> >
> > if(expression)
> > # then section.
> > COMMAND1(ARGS ...)
> > COMMAND2(ARGS ...)
> > ...
> > elseif(expression2)
> > # elseif section.
> > COMMAND1(ARGS ...)
> > COMMAND2(ARGS ...)
> > ...
> > else(expression)
> > # else section.
> > COMMAND1(ARGS ...)
> > COMMAND2(ARGS ...)
> > ...
> > endif(expression)
> >
> > [...]
> >
> > It seems that you don't know CMake at all. You may want to take a
> look
> > at my slides:
> >
> > http://www.elpauer.org/stuff/learning_cmake.pdf
> >
> >
> > On Sun, Nov 1, 2009 at 10:39 PM, Alex H <aditya15417 at hotmail.com>
> wrote:
> > >
> > > How can I do an if else statement in CMake?? Do I need to use
> options?
> > >>
> > >
> > >
> > > ________________________________
> > > From: mike.jackson at bluequartz.net
> > > To: aditya15417 at hotmail.com
> > > Subject: Re: [CMake] add_executable with -D
> > > Date: Sun, 1 Nov 2009 13:59:15 -0500
> > > CC: cmake at cmake.org
> > >
> > > You need to use the add_defintions() command
> > >
> > > Sent from my iPod
> > > Mike Jackson
> > > On Nov 1, 2009, at 13:12, Alex H <aditya15417 at hotmail.com> wrote:
> > >
> > > Usually using g++ I can do the following:
> > > g++ -D DEBUG main.cpp
> > > how can I add the similar function of -D DEBUG in CMake?
> > > I tried to read the add_executable() command and it did not
> provide
> > > something similar to this.. some guidelines are appreciated
> > >
> > >
> > >
> > > ________________________________
> > > Chat online and in real-time with friends and family! Windows
> Live Messenger
> > >
> > > _______________________________________________
> > > Powered by www.kitware.com
> > >
> > > Visit other Kitware open-source projects at
> > > http://www.kitware.com/opensource/opensource.html
> > >
> > > Please keep messages on-topic and check the CMake FAQ at:
> > > http://www.cmake.org/Wiki/CMake_FAQ
> > >
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.cmake.org/mailman/listinfo/cmake
> > >
> > > ________________________________
> > > Windows Live Hotmail: Your friends can get your Facebook
> updates, right from
> > > Hotmail®.
> > > _______________________________________________
> > > Powered by www.kitware.com
> > >
> > > Visit other Kitware open-source projects at
> > > http://www.kitware.com/opensource/opensource.html
> > >
> > > Please keep messages on-topic and check the CMake FAQ at:
> > > http://www.cmake.org/Wiki/CMake_FAQ
> > >
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.cmake.org/mailman/listinfo/cmake
> > >
> >
> >
> >
> > --
> > Pau Garcia i Quiles
> > http://www.elpauer.org
> > (Due to my workload, I may need 10 days to answer)
>
> Chat online and in real-time with friends and family! Windows Live
> Messenger
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091101/312a3b5c/attachment.htm>
More information about the CMake
mailing list