OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Better handlingof aggresive warnings flags in CMakeLists


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Mattias Helsing
Guest





PostPosted: Wed Jan 07, 2009 9:45 pm    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi all, Robert,

With msvc90 on vista and cmake-2.6.2 i had to rearrange the blocks
that set aggressive warnings in CMAKE_CXX_FLAGS and the on that
processes the source tree(s) or the newly set flags wouldn't take
effect until second consecutive configure.

I also replaced the internally cached variables that managed the
aggresive warnings with explicit adding and removing of flags in
CXX_FLAGS

For apple we first required min cmake version 2.6.0 and then had code
warning about using 2.4.x

For MSVC flags for suppressing warnings were added without any guard.
The warnings are in the Export headers anyway.

fixed a few typos

Mattias



------------------
Post generated by Mail2Forum
Back to top
Mattias Helsing
Guest





PostPosted: Thu Jan 08, 2009 11:12 am    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi Robert,

I just read your latest post in the "warning level" thread. This
affects this submissions as I removed the warning disabling flags. I
see now that this was not appropriate.

My suggestion is to add the "/wd<warning_number> to the
OSG_AGGRESIVE_WARNING_FLAGS instead of the way it was done
before....and now I see you've just done that.ok.

Attached is modified submission based on rev 9466

Now starting a fresh build as requested in "warning level" thread

cheers
Mattias

On 1/7/09, Mattias Helsing <> wrote:
Quote:
Hi all, Robert,

With msvc90 on vista and cmake-2.6.2 i had to rearrange the blocks
that set aggressive warnings in CMAKE_CXX_FLAGS and the on that
processes the source tree(s) or the newly set flags wouldn't take
effect until second consecutive configure.

I also replaced the internally cached variables that managed the
aggresive warnings with explicit adding and removing of flags in
CXX_FLAGS

For apple we first required min cmake version 2.6.0 and then had code
warning about using 2.4.x

For MSVC flags for suppressing warnings were added without any guard.
The warnings are in the Export headers anyway.

fixed a few typos

Mattias




------------------
Post generated by Mail2Forum
Back to top
Mattias Helsing
Guest





PostPosted: Thu Jan 08, 2009 11:17 am    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi again,

Sorry, but this submission IS based on 9466

Mattias

On 1/8/09, Mattias Helsing <> wrote:
Quote:
Hi Robert,

I just read your latest post in the "warning level" thread. This
affects this submissions as I removed the warning disabling flags. I
see now that this was not appropriate.

My suggestion is to add the "/wd<warning_number> to the
OSG_AGGRESIVE_WARNING_FLAGS instead of the way it was done
before....and now I see you've just done that.ok.

Attached is modified submission based on rev 9466

Now starting a fresh build as requested in "warning level" thread

cheers
Mattias

On 1/7/09, Mattias Helsing <> wrote:
Quote:
Hi all, Robert,

With msvc90 on vista and cmake-2.6.2 i had to rearrange the blocks
that set aggressive warnings in CMAKE_CXX_FLAGS and the on that
processes the source tree(s) or the newly set flags wouldn't take
effect until second consecutive configure.

I also replaced the internally cached variables that managed the
aggresive warnings with explicit adding and removing of flags in
CXX_FLAGS

For apple we first required min cmake version 2.6.0 and then had code
warning about using 2.4.x

For MSVC flags for suppressing warnings were added without any guard.
The warnings are in the Export headers anyway.

fixed a few typos

Mattias





------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Thu Jan 08, 2009 11:31 am    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

On Thu, Jan 8, 2009 at 11:17 AM, Mattias Helsing <> wrote:
Quote:
Hi again,

Sorry, but this submission IS based on 9466

You caught me mid commit, I've now updated to this latest one as well
and is now checked in.

The older VS warning disable block written to replace the #pragma's is
still not guarded though, so it's not possible to prevent the
suppression of these warnings. I think it might be best to # out this
block of warning disables and use the OSG_DISABLE_MSVC_WARNINGS to
toggle on/off this warning suppression via the include/osg/Export
pragma's that are guarded. I have just checked in this change for
testing purposes. I.e. the code now looks like:

# turn off various warnings
# foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd${warning}")
# endforeach(warning)

Right now what I really need is a listing of all the warnings with the
OSG_AGGRESSIVE_WARNING_FLAGS on (as it is by default) and the
OSG_DISABLE_MSVC_WARNINGS set to off, with the above removal of the
suppressing of warnings.

Warnings in headers is what is probably best to concentrate on fixing
so that we will just need warning suppression for the OSG build
itself, and won't have need for #pragama in the headers any more.

Robert.


------------------
Post generated by Mail2Forum
Back to top
Mattias Helsing
Guest





PostPosted: Thu Jan 08, 2009 12:04 pm    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi Robert

On 1/8/09, Robert Osfield <> wrote:
Quote:

You caught me mid commit, I've now updated to this latest one as well
and is now checked in.

nice. and it worked great here with cmake-2.6.2

Quote:

The older VS warning disable block written to replace the #pragma's is
still not guarded though, so it's not possible to prevent the
suppression of these warnings. I think it might be best to # out this
block of warning disables and use the OSG_DISABLE_MSVC_WARNINGS to
toggle on/off this warning suppression via the include/osg/Export
pragma's that are guarded. I have just checked in this change for
testing purposes. I.e. the code now looks like:

# turn off various warnings
# foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd${warning}")
# endforeach(warning)

Right now what I really need is a listing of all the warnings with the
OSG_AGGRESSIVE_WARNING_FLAGS on (as it is by default) and the
OSG_DISABLE_MSVC_WARNINGS set to off, with the above removal of the
suppressing of warnings.

I've deleted the cache and started fresh with the above requested
options. This seems to take a bit of time so you'll have to wait. If
you want me to digest it somehow just tell me. Otherwise I'll send the
full zip.

Mattias

Quote:

Warnings in headers is what is probably best to concentrate on fixing
so that we will just need warning suppression for the OSG build
itself, and won't have need for #pragama in the headers any more.

Robert.




------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Thu Jan 08, 2009 12:44 pm    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi Mattias,

On Thu, Jan 8, 2009 at 12:04 PM, Mattias Helsing <> wrote:
Quote:
I've deleted the cache and started fresh with the above requested
options. This seems to take a bit of time so you'll have to wait. If
you want me to digest it somehow just tell me. Otherwise I'll send the
full zip.

Just send me the whole zip, I can use nedit to find and sort all the
warnings without much hassle.

I'm curious about the build being slower, is this just because of the
high warning level?

Considering compile is already slow under Windows perhaps it would be
best to avoid the higher level of warnings under Windows once we've
get thing compiling more cleanly at higher warning level. gcc is
already pretty fast so we can probably accommodate a bit more done by
the compiler.

Robert.


------------------
Post generated by Mail2Forum
Back to top
Skylark (Jean-Sébastien Guay)
Professional


Joined: 05 Jan 2009
Posts: 2249

PostPosted: Thu Jan 08, 2009 2:33 pm    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hello Mattias,

Quote:
I also replaced the internally cached variables that managed the
aggresive warnings with explicit adding and removing of flags in
CXX_FLAGS

Does that mean I won't see the effect of OSG_USE_AGGRESSIVE_WARNINGS in
the CMAKE_CXX_FLAGS variable? Because with your changed file, whether I
set OSG_USE_AGGRESSIVE_WARNINGS to ON or OFF doesn't seem to have any
effect (on CMAKE_CXX_FLAGS inside CMake at least - I didn't test after
generating the projects). /W4 never seems to show up, it's always /W3.

Quote:
For MSVC flags for suppressing warnings were added without any guard.
The warnings are in the Export headers anyway.

What is the concensus there? The warnings were being suppressed in two
places : compiler flags and pragmas in include/osg/Export... Which one
should we choose? You've removed the compiler flags, but I was under the
impression (from a post from Robert this morning) that he wants to
remove the pragmas and only keep the compiler flags, so that projects
can suppress the warnings they want to suppress on their side.

J-S
--
______________________________________________________
Jean-Sebastien Guay
http://www.cm-labs.com/
http://whitestar02.webhop.org/


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Skylark (Jean-Sébastien Guay)
Professional


Joined: 05 Jan 2009
Posts: 2249

PostPosted: Thu Jan 08, 2009 2:40 pm    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi Mattias and Robert,

Quote:
nice. and it worked great here with cmake-2.6.2

OK, disregard my previous message, it seems there was some work done
after the CMakeLists.txt that Mattias posted so I may have tested with
an incomplete submission... I'll test again with the changes that are
checked in and see.

Sorry for "jumping the gun".

J-S
--
______________________________________________________
Jean-Sebastien Guay
http://www.cm-labs.com/
http://whitestar02.webhop.org/


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Mattias Helsing
Guest





PostPosted: Thu Jan 08, 2009 3:37 pm    Post subject:
Better handlingof aggresive warnings flags in CMakeLists
Reply with quote

Hi Robert,

On 1/8/09, Robert Osfield <> wrote:
Quote:
Hi Mattias,

On Thu, Jan 8, 2009 at 12:04 PM, Mattias Helsing <>
wrote:
Quote:
I've deleted the cache and started fresh with the above requested
options. This seems to take a bit of time so you'll have to wait. If
you want me to digest it somehow just tell me. Otherwise I'll send the
full zip.

Just send me the whole zip, I can use nedit to find and sort all the
warnings without much hassle.

I lost the second half, partly thanks to windows clipboard "¤*!#¤"#
You got the first 218000 lines of output. The final line count was 469k lines

Quote:

I'm curious about the build being slower, is this just because of the
high warning level?

I beleive it's the shell IO that suddenly becomes a bottle neck with
very verbose output. We used a *very* verbose product a few years ago
and couldn't figure out why our app had problems just moving dots
until we stopped the verbose output to the console and everything
began to run smoothly. Also I forgot to turn on the MP switch after
deleting the cache.

Quote:

Considering compile is already slow under Windows perhaps it would be
best to avoid the higher level of warnings under Windows once we've
get thing compiling more cleanly at higher warning level. gcc is
already pretty fast so we can probably accommodate a bit more done by
the compiler.

I don't think you should opt for a lower warn level ONLY because osg
compiles slower in windows. It is only noticable with *many* warnings
in which case it doesn't make sense to have a high warning level
anyway.

Mattias

Quote:

Robert.




------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Resolving FBX warnings robertosfield General 0 Tue Sep 11, 2018 2:33 pm View latest post
No new posts 3.4.1 bug in CMakeLists? Rollastre Prostrit General 5 Fri Sep 22, 2017 8:33 am View latest post
No new posts Warnings: Failed grabbing the focus a... umadevi2193 General 3 Fri Nov 11, 2016 7:49 am View latest post
No new posts fixed visual studio 2015 warnings for... Voerman, L. Submission 1 Wed Jun 08, 2016 1:58 pm View latest post
No new posts OpenThreads - qt - CMakeLists.txt error Davide Raccagni Submission 1 Wed Jun 01, 2016 10:58 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP