<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 19, 2014 at 12:47 PM, Aleksey Midenkov <span dir="ltr"><<a href="mailto:midenok@gmail.com" target="_blank">midenok@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">When I compile kdevplatform, it inserts -g -O2:<br>
<br>
cd /home/midenok/src/kde/kdevelop/4.6/kdevplatform/build/sublime &&<br>
/usr/bin/c++ -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=34<br>
-DKDE_DEFAULT_DEBUG_AREA=9504 -DKDE_DEPRECATED_WARNINGS<br>
-DMAKE_SUBLIME_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_STL<br>
-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS<br>
-DQURL_NO_CAST_FROM_QSTRING -D_BSD_SOURCE -D_REENTRANT<br>
-D_XOPEN_SOURCE=500 -g -O0 -DDEBUG -Wnon-virtual-dtor -Wno-long-long<br>
-Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith<br>
-Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new<br>
-fno-common -Woverloaded-virtual -fno-threadsafe-statics<br>
-fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -g<br>
-O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline -fPIC ...<br>
<br>
Attempt to overwrite via CMAKE_CXX_FLAGS or CMAKE_CXX_FLAGS_DEBUG do<br>
not have effect because CMAKE_CXX_FLAGS goes before -g -O2 and<br>
CMAKE_CXX_FLAGS_DEBUG doesn't work at all even with<br>
CMAKE_BUILD_TYPE:STRING=Debug. :(<br>
<br>
>From where these -g -O2 go? I can't find them in CMakeCache.txt. There<br>
are all -O2 in CMakeCache.txt and they are different strings:<br>
<br>
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG -DQT_NO_DEBUG<br>
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG<br>
<br>
So, it's not from CMakeCache.txt.<br>
_______________________________________________<br>
KDevelop mailing list<br>
<a href="mailto:KDevelop@kde.org">KDevelop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kdevelop" target="_blank">https://mail.kde.org/mailman/listinfo/kdevelop</a><br>
</blockquote></div><br></div><div class="gmail_extra">Maybe this can help you:</div><div class="gmail_extra"><a href="http://stackoverflow.com/questions/10085945/cmake-cflags-cxxflags-modification">http://stackoverflow.com/questions/10085945/cmake-cflags-cxxflags-modification</a><br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Good luck!</div><div class="gmail_extra">Aleix</div></div>