only be fatal on warnings for debug builds
authorcoolo <coolo@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Wed, 12 Dec 2007 06:52:09 +0000 (06:52 +0000)
committercoolo <coolo@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Wed, 12 Dec 2007 06:52:09 +0000 (06:52 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@43005 e0cc52ee-31ee-0310-8b87-e83c4596d67c

CMakeLists.txt
src/YQUI_core.cc
yast2-qt4.spec.in

index 5ff293c..862413d 100644 (file)
@@ -1,8 +1,9 @@
 PROJECT(yast2-qt4)
 SET( CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/cmake/Modules" ${CMAKE_MODULE_PATH} )
 
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -Wall -Woverloaded-virtual -Wno-deprecated" )
-SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -g -O3 -Wall" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Woverloaded-virtual -Wno-deprecated" )
+SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -g -Wall" )
+set( CMAKE_CXX_FLAGS_RELEASE   "${CMAKE_CXX_FLAGS_RELEASE} -DQT_NO_DEBUG -DNDEBUG")
 
 SET( RPMNAME "yast2-qt4" )
 
index 1bdbc80..7272122 100644 (file)
@@ -580,13 +580,19 @@ qMessageHandler( QtMsgType type, const char * msg )
            break;
        case QtWarningMsg:
            y2warning ("qt-warning: %s\n", msg);
+#ifndef NDEBUG
            abort();
+#endif
            break;
        case QtCriticalMsg:
            y2warning ("qt-critical: %s\n", msg);
+#ifndef NDEBUG
+            abort();
+#endif
            break;
        case QtFatalMsg:
            y2internal ("qt-fatal: %s\n", msg);
+            abort();
            exit (1);           // qt does the same
     }
 }
index 75a08ea..e169cd2 100644 (file)
@@ -32,7 +32,7 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_SKIP_RPATH=1 \
       ..
-make %{?jobs:-j %jobs}
+make %{?jobs:-j %jobs} VERBOSE=1
 
 %install
 cd build