[geos-devel] build error...

David Burken dburken at comcast.net
Wed Jun 6 05:52:34 PDT 2012


Thanks Sandro!

After fixing that there's one more (Fedora 17 gcc version 4.7.0 )

CMakeFiles/geos_unit.dir/capi/GEOSConvexHullTest.cpp.o:(.bss+0x0): 
multiple definition of `tut::test_capigeoscontains_group'
CMakeFiles/geos_unit.dir/capi/GEOSContainsTest.cpp.o:(.bss+0x0): first 
defined here

Commenting one out fixes...

Here's a cmake macro you could use.  You can see this example at:
http://www.cmake.org/cmake/help/v2.8.8/cmake.html

This will initialize ${Project_WC_REVISION}:

#################################################################################
#  MACRO: GET_SVN_REVISION
#
#  DESCRIPTION:
#      MACRO FOR GETTING THE SVN revision for this build
#################################################################################
MACRO (GET_SVN_REVISION)
    FIND_PACKAGE(Subversion)
    IF(SUBVERSION_FOUND)
       Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
       MESSAGE("Current revision is ${Project_WC_REVISION}")
       Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
       MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
    ENDIF()
ENDMACRO(GET_SVN_REVISION)

So if you call it in your CMakeList.txt:

GET_SVN_REVISION()

You'll have ${Project_WC_REVISION} set.  Tested in ossim code and get:

Current revision is 21080

Hope that helps some,
Dave


On 06/06/2012 07:53 AM, Sandro Santilli wrote:
> On Wed, Jun 06, 2012 at 07:27:14AM -0400, David Burken wrote:
>> Hi,
>>
>> Get this error now from svn checkout / cmake build on both linux and Mac:
>>
>> [ 83%] Building CXX object capi/CMakeFiles/geos_c.dir/geos_ts_c.cpp.o
>> /work/osgeo/geos/geos-svn/capi/geos_ts_c.cpp:96:34: fatal error:
>> ../geos_svn_revision.h: No such file or directory
>>
>> I can fix by hacking geos_ts_c.cpp but is there a mechanism to
>> generate geos_svn_revision.h that I'm missing?
> sh tools/svn_repo_revision.sh geos_svn_revision.h
>
> It is encoded in Makefiles, not in CMake (ticket [and patch] welcome)
>
> --strk;
>
>    ,------o-.
>    |   __/  |    Delivering high quality PostGIS 2.0 !
>    |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>    `-o------'
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>


More information about the geos-devel mailing list