[CMake] overriding -03 -DNDEBUG Release flags

Eric Noulard eric.noulard at gmail.com
Mon Sep 10 09:12:20 EDT 2018


Le lun. 10 sept. 2018 à 14:34, Stéphane Ancelot <sancelot at numalliance.com>
a écrit :

> Hi,
>
> In one project I need to compile with -O2 option , how to set it and
> remove -O3 -DNDEBUG flags for this project ?
>

May be you can create a new Build Type with appropriate flags:
https://gitlab.kitware.com/cmake/community/wikis/FAQ#how-can-i-extend-the-build-modes-with-a-custom-made-one-

and set it as the default build type for this particular project?
https://gitlab.kitware.com/cmake/community/wikis/FAQ#how-can-i-change-the-default-build-mode-and-see-it-reflected-in-the-gui
https://blog.kitware.com/cmake-and-the-default-build-type/


> --
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180910/2f6e5fd2/attachment.html>


More information about the CMake mailing list