On Fri, Jun 5, 2009 at 4:36 AM, Robert Osfield <[email protected]>wrote:
> Hi Paul, > > On Thu, Jun 4, 2009 at 8:11 PM, Paul > Melis<[email protected]> wrote: > > First, try this: > > > > In applications/osgversion/CMakeLists.txt change ENDIF() to > > ENDIF(OSG_MAINTAINER) > > That line looks fishy. > > Cmake used to require the the IF() ENDIF() matched but this > requirement was dropped, and now the OSG-2.9.x and svn/trunk has been > cleaned up to not have the matching entries as it makes the code far > more readable and maintainable. > > I was under the impression that this wouldn't cause too many problems > except for really old CMake versions. Here's the problem that caused the configure warning. The variable below (which is on the first line in the trunk's CMakeLists.txt) would need to be added to the OpenSceneGraph-2.8.0 branch if we wanted to take advantage of unmatched if/endif in that branch. This change on the trunk came in r9908 and wasn't applied to the 2.8 branch. set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) This allows the unmatched if/else/endif to work on CMake 2.4.4-2.4.8. The variable is not needed in CMake 2.6 as it automatically supports the feature. The change in r10313 does fix the warning. To prevent this warning from cropping up again I would suggest either applying r9908 to the 2.8 branch or be very careful backporting CMakeLists.txt files and changes from the trunk to the OpenSceneGraph-2.8 branch since they all no longer have matching else/endif constructs. -- Philip Lowman
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

