I think you should be able to do

set(CMAKE_CXX_FLAGS_RELEASE "-O3")

or

set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE)

in your CMakeLists.txt. The CACHE directive is optional, and whether to add
it depends on what kind of visibility you like that change to have. See
here http://www.cmake.org/cmake/help/v3.0/command/set.html for more info
about CMake cache variables. The origin of the -DNDEBUG -O2 is from
https://github.com/kripken/emscripten/blob/master/cmake/Modules/Platform/Emscripten.cmake#L162
which sets the default optimization settings.

2015-08-03 19:05 GMT+03:00 Guillaume Leclerc <
[email protected]>:

> Hello,
>
> My project uses cmake to be compiled. The problem is emcmake seem to
> override my cmake variable as the output of "cmake -LAH shows" :
>
> // Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE
> CMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -O2
>
> I just want to use -O3 but I can't find how to disable this strange
> feature.
>
> Thank you for your help,
>
> Guillaume Leclerc
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to