On 23. Dec, 2009, at 9:22 , Water Lin wrote:
>
> I am trying to use the "-03" option to gcc. But after I use
> --------------------
> add_definitions(-03)
> --------------------
>
> in CMakeLists.txt file and generate the Makefile, I make the project and
> gcc provides me a info:
> -----------
> c++: unrecognized option '-03'
> -----------
>
> How can I add "-03" option by CMakeLists.txt?
>
> Thanks
>
> Water Lin
That's because the options is not called -03 ("dash zero three") but -O3 ("dash
big-ooh three").
And you shouldn't do that anyways. Rather set the CMAKE_BUILD_TYPE option to
"Release" in your cache (NOT the CMakeLists.txt file). E.g. if you're using the
command line:
cmake -DCMAKE_BUILD_TYPE=Release /path/to/source
If you're using the graphical interface, just set the variable there (without
the quotes).
HTH
Michael
_______________________________________________
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