[glideplan_swproj] Re: [glideplan_swproj] Re: CMake

  • From: Tomáš Zámečník <pulcik@xxxxxxxx>
  • To: glideplan_swproj@xxxxxxxxxxxxx
  • Date: Sun, 01 Jan 2012 22:24:00 +0100 (CET)

The warnings came from Qt or Windows header files included in our cpps.
I thought that they occur only when moc files are built, but they also occur in 
our files (it has nothing to do with moc files)
Example of warnings:
4>c:\qtsdk\desktop\qt\4.7.4\msvc2008\include\qtgui\qformlayout.h(157) : warning 
C4626: 'QFormLayout' : assignment operator could not be generated because a 
base class assignment operator is inaccessible
3>C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtGui/qstyleoption.h(744) : 
warning C4820: 'QStyleOptionSpinBox' : '3' bytes padding added after data 
member 'QStyleOptionSpinBox::frame'
6>C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtGui/qtextoption.h(152) : warning 
C4365: '=' : conversion from 'int' to 'uint', signed/unsigned mismatch
6>C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtGui/qtextoption.h(97) : warning 
C4365: 'argument' : conversion from 'const uint' to 'int', signed/unsigned 
4>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(539) : 
warning C4820: '_stat64i32' : '2' bytes padding added after data member 
3>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wchar.h(509) : 
warning C4820: 'stat' : '2' bytes padding added after data member 'stat::st_gid'

There were more than 23000 of such messages. It also significantly slowed down 
build process.
(without warnings it took 1:40 (min:sec), with warnings it took almost 3 

I found some discussion about this topic:

I think that there shouldn't be this option in cmakelist at all.
We can discuss the warning level sometime, but in my opinion it's not the vital
problem...the problem, we should concentrate on, is that when the application 
it fails immediately.
Before Christmas it was running. Are you able (on Linux) to run the last 
version properly also with map rendering???


> ------------ Původní zpráva ------------
> Od: Kuba Marek <blue.cube@xxxxxxxxx>
> Předmět: [glideplan_swproj] Re: CMake
> Datum: 01.1.2012 21:42:55
> ----------------------------------------
> I think the list of osgearth libraries came from maria's code, but I'm
> really not sure.
> The cmake code you posted here checks if the flag -Wall works in the
> current compiler and adds it if it does. I thought it would only work
> on gcc, though.
> I think warnings should be enabled on all platflorms. If the code
> generated by moc causes warnings we should either try to fix it or
> silence warnings only from those files.
> K
> > Hi Kuba!
> > 1)
> > I removed the build directory, run cmake, build application in VS.
> > Some functions were missing (linker errors) ...I added osgGA library
> > to required set of libraries in cmakelists and now it works well.
> > How do you know, that this subset of osg libraries is the right one?
> > ...did you search the library dependencies?
> >
> > 2)
> > When I commented out these lines in the cmakelists (the commit with
> > wall flag)
> >
> > #INCLUDE(CheckCXXCompilerFlag)
> > #  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
> >
> > warning disappeared and everything builds well.
> > Why are these lines in cmakelists?
> > If it is for "Enable compiler warnings on linux" as you mentioned in
> > commit, there should be statement:
> > ...I'm going to add it now...please test it, if it works on linux.
> >
> > Tom
> > To visit archive or unsubscribe, follow:
> > http://www.freelists.org/list/glideplan_swproj

To visit archive or unsubscribe, follow:

Other related posts: