Re: [osg-users] Warnings in VS
Interesting. With current svn, I am able to toggle OSG_USE_AGGRESSIVE_WARNINGS from OFF to ON without deleting my cache. This seems to have fixed itself (I'm not using Mattias' fix). Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday, January 07, 2009 2:31 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Warnings in VS Hello Mattias, > Makes it kind of hard to test. Sorry about that. Trying again before > submitting the file to osg-submissions. Got the file, thanks. (third time's a charm right? ;-) ) I'll try it out tomorrow. > i didn't either at first. I was really trying to get my head around > the internal cache variables involved and things didn't behave as > expected. I have now tested this on linux with cmake-2.6.3-RCx and > there this problem doesn't exist. Btw I'm currently using > msvc90Express on Vista 32-bit and cmake-2.6.2. I'm on msvc8 but the rest is the same for me. It would be surprising if it was Linux itself that fixed the problem, so it must be cmake-2.6.3-RCx... I'll try downloading RC5 from http://www.cmake.org/files/v2.6/ and see. > Cool. And I'm working on a submission for the cpack stuff we talked > about before the holidays ;-) Excellent, I was just about to ask you if that was still planned or not... :-) Thanks, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Hello Mattias, Makes it kind of hard to test. Sorry about that. Trying again before submitting the file to osg-submissions. Got the file, thanks. (third time's a charm right? ;-) ) I'll try it out tomorrow. i didn't either at first. I was really trying to get my head around the internal cache variables involved and things didn't behave as expected. I have now tested this on linux with cmake-2.6.3-RCx and there this problem doesn't exist. Btw I'm currently using msvc90Express on Vista 32-bit and cmake-2.6.2. I'm on msvc8 but the rest is the same for me. It would be surprising if it was Linux itself that fixed the problem, so it must be cmake-2.6.3-RCx... I'll try downloading RC5 from http://www.cmake.org/files/v2.6/ and see. Cool. And I'm working on a submission for the cpack stuff we talked about before the holidays ;-) Excellent, I was just about to ask you if that was still planned or not... :-) Thanks, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Hi again, yes I forgot again. I'm terrible at this. Mattias On Wed, Jan 7, 2009 at 10:09 PM, Mattias Helsing wrote: > Hi J-S, > > On Wed, Jan 7, 2009 at 2:57 PM, Jean-Sébastien Guay > wrote: >> Hello Mattias, >> >> >> I'd like to test, but it seems you forgot to attach the file? > > Makes it kind of hard to test. Sorry about that. Trying again before > submitting the file to osg-submissions. > >> >>> I stumbled upon another problem with the aggresive warnings. I needed >>> to configure twice before a changed aggresive setting would take >>> effect because the changes to CMAKE_CXX_FLAGS are made after source is >>> processed. Have you seen this? >>> Actually this should be seen on any platform. Have people on other >>> platforms seen it? >> >> I didn't see this specifically, but didn't try either. I just changed the >> value, generated the project files and noticed that the actual compiler >> flags hadn't changed. I didn't think to click "configure" twice. > > i didn't either at first. I was really trying to get my head around > the internal cache variables involved and things didn't behave as > expected. I have now tested this on linux with cmake-2.6.3-RCx and > there this problem doesn't exist. Btw I'm currently using > msvc90Express on Vista 32-bit and cmake-2.6.2. > >> >> I'll investigate. > > Cool. And I'm working on a submission for the cpack stuff we talked > about before the holidays ;-) > > cheers > Mattias > >> >> J-S >> -- >> __ >> Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com >> http://www.cm-labs.com/ >>http://whitestar02.webhop.org/ >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > IF(WIN32) CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR) ELSE(WIN32) IF(APPLE) CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) ELSE(APPLE) CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR) ENDIF(APPLE) ENDIF(WIN32) if(COMMAND cmake_policy) # Works around warnings libraries linked against that don't # have absolute paths (e.g. -lpthreads) cmake_policy(SET CMP0003 NEW) # Works around warnings about escaped quotes in ADD_DEFINITIONS # statements. cmake_policy(SET CMP0005 NEW) # cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names # quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below." if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) cmake_policy(SET CMP0008 OLD) endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) endif(COMMAND cmake_policy) PROJECT(OpenSceneGraph) SET(OPENSCENEGRAPH_MAJOR_VERSION 2) SET(OPENSCENEGRAPH_MINOR_VERSION 7) SET(OPENSCENEGRAPH_PATCH_VERSION 8) SET(OPENSCENEGRAPH_SOVERSION 53) # set to 0 when not a release candidate, non zero means that any generated # svn tags will be treated as release candidates of given number SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 0) SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION}) SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_VERSION}) SET(OSG_PLUGIN_PREFIX "") IF (CYGWIN) SET(OSG_PLUGIN_PREFIX "cygwin_") ENDIF(CYGWIN) IF(MINGW) SET(OSG_PLUGIN_PREFIX "mingw_") ENDIF(MINGW) # We want to build SONAMES shared librariess SET(OPENSCENEGRAPH_SONAMES TRUE) SET(OPENTHREADS_SONAMES TRUE) SET(OpenThreads_SOURCE_DIR ${OpenSceneGraph_SOURCE_DIR}) # We have some custom .cmake scripts not in the official distribution. # Maybe this can be used override existing behavior if needed? SET(CMAKE_MODULE_PATH "${OpenSceneGraph_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") # Okay, here's the problem: On some platforms, linking against OpenThreads # is not enough and explicit linking to the underlying thread library # is also required (e.g. FreeBSD). But OpenThreads may be built with different # backends (Pthreads, Sproc, Windows) so we don't know what the underlying # thread library is because some platforms support multiple backends (e.g. # IRIX supports Sproc and Pthreads). Linking all libraries won't work # because the libraries may be incompatible. # So the current solution is to attempt best guess linking and exempt certain # cases. With IRIX, we're going to hope explicit linking to the underlying # library is not necessary. We currently don't case for pthreads on Windows # which might be an issue on things like Cygwin. This may need to be fixed. FIND_PACKAGE(Threads) IF(CMAKE_SYSTEM MATCHES IRIX) # Erase CMAKE_THREAD_LIBS_INIT and hope it works SET(CMAKE_THREAD_LIBS_INIT "" CACHE IN
Re: [osg-users] Warnings in VS
Hi J-S, On Wed, Jan 7, 2009 at 2:57 PM, Jean-Sébastien Guay wrote: > Hello Mattias, > > > I'd like to test, but it seems you forgot to attach the file? Makes it kind of hard to test. Sorry about that. Trying again before submitting the file to osg-submissions. > >> I stumbled upon another problem with the aggresive warnings. I needed >> to configure twice before a changed aggresive setting would take >> effect because the changes to CMAKE_CXX_FLAGS are made after source is >> processed. Have you seen this? >> Actually this should be seen on any platform. Have people on other >> platforms seen it? > > I didn't see this specifically, but didn't try either. I just changed the > value, generated the project files and noticed that the actual compiler > flags hadn't changed. I didn't think to click "configure" twice. i didn't either at first. I was really trying to get my head around the internal cache variables involved and things didn't behave as expected. I have now tested this on linux with cmake-2.6.3-RCx and there this problem doesn't exist. Btw I'm currently using msvc90Express on Vista 32-bit and cmake-2.6.2. > > I'll investigate. Cool. And I'm working on a submission for the cpack stuff we talked about before the holidays ;-) cheers Mattias > > J-S > -- > __ > Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ >http://whitestar02.webhop.org/ > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Hello Mattias, I had a look at this. I suspect this was caused by the INTERNALly cached OLD_CMAKE:CXX_FLAGS. I'm not sure I had your setup but made some changes and at the same time removed a "fixme". I have attached my current CMakeLists.txt. If you have the time please test, though I guess your setups are fixed by now. I'd like to test, but it seems you forgot to attach the file? I stumbled upon another problem with the aggresive warnings. I needed to configure twice before a changed aggresive setting would take effect because the changes to CMAKE_CXX_FLAGS are made after source is processed. Have you seen this? Actually this should be seen on any platform. Have people on other platforms seen it? I didn't see this specifically, but didn't try either. I just changed the value, generated the project files and noticed that the actual compiler flags hadn't changed. I didn't think to click "configure" twice. I'll investigate. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Hi J-S, Paul, I had a look at this. I suspect this was caused by the INTERNALly cached OLD_CMAKE:CXX_FLAGS. I'm not sure I had your setup but made some changes and at the same time removed a "fixme". I have attached my current CMakeLists.txt. If you have the time please test, though I guess your setups are fixed by now. I stumbled upon another problem with the aggresive warnings. I needed to configure twice before a changed aggresive setting would take effect because the changes to CMAKE_CXX_FLAGS are made after source is processed. Have you seen this? Actually this should be seen on any platform. Have people on other platforms seen it? Mattias On Tue, Jan 6, 2009 at 3:30 PM, Jean-Sébastien Guay wrote: > Hi Paul, > >> But has anything been done to fix the problem that >> OSG_USE_AGGRESSIVE_WARNINGS is always ON and can't be disabled? If this >>was >> discussed in the other thread, I missed it. > > We'd need a CMake expert to see why the value is being cached and changing > it doesn't have any effect... It looks like the value in the cache is > overriding the value we set in CMake. > > As I said, the workaround is to delete your build/CMakeCache.txt, then > re-run CMake and before you click Configure the second time (the first one > being the initial compiler detection phase) change the value to OFF then. It > should take - though you won't be able to change it back to ON without > deleting your cache again, so it's not a very good workaround. :-) > > That the value *defaults* to on is another issue that Robert discussed in > the other thread. I don't have any issue with that, but indeed it should be > possible to change it. > > J-S > -- > __ > Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ >http://whitestar02.webhop.org/ > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Hi Paul, But has anything been done to fix the problem that OSG_USE_AGGRESSIVE_WARNINGS is always ON and can't be disabled? If this was discussed in the other thread, I missed it. We'd need a CMake expert to see why the value is being cached and changing it doesn't have any effect... It looks like the value in the cache is overriding the value we set in CMake. As I said, the workaround is to delete your build/CMakeCache.txt, then re-run CMake and before you click Configure the second time (the first one being the initial compiler detection phase) change the value to OFF then. It should take - though you won't be able to change it back to ON without deleting your cache again, so it's not a very good workaround. :-) That the value *defaults* to on is another issue that Robert discussed in the other thread. I don't have any issue with that, but indeed it should be possible to change it. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
With latest svn and a clean cache, setting OSG_USE_AGGRESSIVE_WARNINGS to OFF produces zero warnings for OpenThreads, osg, osgDB, and osgUtil. The rest is still building. This is a good thing! Thanks to all who helped resolve this. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Monday, January 05, 2009 4:21 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Warnings in VS Sorry I missed the other thread before posting. The extra work involved in having to reinstall my OS has caused me to skip a lot of osg-users email. I read the other thread, and I see changes have been submitted to remove /Wall. This is great -- we don't want the build to be bottlenecked by output to the console. :-/ But has anything been done to fix the problem that OSG_USE_AGGRESSIVE_WARNINGS is always ON and can't be disabled? If this was discussed in the other thread, I missed it. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Monday, January 05, 2009 7:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Warnings in VS Hi Paul, > Anyone else seeing this issue? Yes, see the thread "Warning level" I started over the holidays. :-) > The default behavior appears to be /W4, and there doesn't appear to be > a CMake switch to change it. OSG_DISABLE_MSVC_WARNINGS is set to OFF, > but this variable is ignore in the CMake scripts, as near as I can tell. > OSG_USE_AGGRESSIVE_WARNINGS defaults to ON, but setting it to OFF has > no effect. It has an effect only if you set it to OFF before clicking Configure the first time. After that, it seems to be cached and changing the value doesn't change anything, you need to delete your cache and run CMake again. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Sorry I missed the other thread before posting. The extra work involved in having to reinstall my OS has caused me to skip a lot of osg-users email. I read the other thread, and I see changes have been submitted to remove /Wall. This is great -- we don't want the build to be bottlenecked by output to the console. :-/ But has anything been done to fix the problem that OSG_USE_AGGRESSIVE_WARNINGS is always ON and can't be disabled? If this was discussed in the other thread, I missed it. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Monday, January 05, 2009 7:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Warnings in VS Hi Paul, > Anyone else seeing this issue? Yes, see the thread "Warning level" I started over the holidays. :-) > The default behavior appears to be /W4, and there doesn't appear to be > a CMake switch to change it. OSG_DISABLE_MSVC_WARNINGS is set to OFF, > but this variable is ignore in the CMake scripts, as near as I can tell. > OSG_USE_AGGRESSIVE_WARNINGS defaults to ON, but setting it to OFF has > no effect. It has an effect only if you set it to OFF before clicking Configure the first time. After that, it seems to be cached and changing the value doesn't change anything, you need to delete your cache and run CMake again. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Warnings in VS
Hi Paul, Anyone else seeing this issue? Yes, see the thread "Warning level" I started over the holidays. :-) The default behavior appears to be /W4, and there doesn't appear to be a CMake switch to change it. OSG_DISABLE_MSVC_WARNINGS is set to OFF, but this variable is ignore in the CMake scripts, as near as I can tell. OSG_USE_AGGRESSIVE_WARNINGS defaults to ON, but setting it to OFF has no effect. It has an effect only if you set it to OFF before clicking Configure the first time. After that, it seems to be cached and changing the value doesn't change anything, you need to delete your cache and run CMake again. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Warnings in VS
Hi all -- There seems to be a problem with the current svn head CMake. I'm doing a clean build, and hadn't noticed this problem with current svn head and an existing CMake cache, so delete your cache to reproduce the problem. The default behavior appears to be /W4, and there doesn't appear to be a CMake switch to change it. OSG_DISABLE_MSVC_WARNINGS is set to OFF, but this variable is ignore in the CMake scripts, as near as I can tell. OSG_USE_AGGRESSIVE_WARNINGS defaults to ON, but setting it to OFF has no effect. I'm currently working around the problem by manually setting OSG_AGGRESSIVE_WARNING_FLAGS to "/W1" in CMakeLists.txt at line 566. It looks like the value of this variable is replacing the normal CXX flags unless I manually set them myself; see CMakeLists.txt line 586. Anyone else seeing this issue? -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org