[pgrouting-dev] pgRouting 2.0 Update - Build outside src tree

Daniel Kastl daniel at georepublic.de
Mon Mar 25 18:10:10 PDT 2013


> >
> > cmake -H. -Bmybuild -DWITH_TSP=ON -DWITH_DD=ON -DWITH_DOC=ON
> > cd mybuild && make
> >
> > Where -B <dir>  - where the build tree will be created (build)
> >       -H <dir>  - where the project source tree is located (home)
>
> Could the -B switch be optional, defaulting to $PWD, and the source
> tree be possibly specified without a switch ? That'd make the cmake
> interface similar to the standard ./configure line:
>

If you don't specify -B then the current directory is assumed.
I tried to set a default build directory, but this seems to be impossible
with CMake. It seems CMake already performs several tasks already before
looking at CMakeLists.txt

So if you don't pay attention and run cmake in the project source, you mess
up the source tree.
(though you can do a cleanup with "make distclean")



>
>  mkdir mybuild; cd mybuild; cmake .. && make
>
> This is how qgis cmake build works, for example.
>

I will try this out and if it's possible to make this default.


>
> Also, does this still require cmake 2.8.10 ?
>

Yes, it would be nice if there wouldn't be a requirement for such a recent
version of CMake,
I even had to compile for Ubuntu.

Daniel



>
> --strk;
>
> >
> > You can build it "in" a sub-dir in the source tree or put the source
> > tree elsewhere.
> >
> > Thank you for the suggestion.
> >
> > -Steve
> >
> > On 3/13/2013 10:02 AM, Sandro Santilli wrote:
> > >On Wed, Mar 13, 2013 at 08:24:52AM -0400, Stephen Woodbridge wrote:
> > >>Hi strk,
> > >>
> > >>On 3/13/2013 3:14 AM, Sandro Santilli wrote:
> > >>>Hi Stephen,
> > >>>is the branch supposed to be buildable on linux ?
> > >>
> > >>More or less, I have been changing between linux and windows to keep
> > >>the cmake changes working on both side. It needs me to push some
> > >>stuff back for linux which will happen later today.
> > >>
> > >>BUT - at this point it is only "buildable", it does not install and
> > >>has not been tested. I also have a lot of changes to make to it for
> > >>postgis 2.x compatibility.
> > >
> > >It's not buildable here, with cmake 2.8.7:
> > >
> > >  -- Configuring done
> > >  CMake Error at CMakeLists.txt:139 (ADD_LIBRARY):
> > >   Cannot find source file:
> > >
> > >     $<TARGET_OBJECTS:astar>
> > >
> > >   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm
> .hpp
> > >   .hxx .in .txx
> > >
> > >And the same message repeated for:
> > >
> > >   $<TARGET_OBJECTS:dijkstra>
> > >   $<TARGET_OBJECTS:shooting_star>
> > >   $<TARGET_OBJECTS:trsp>
> > >
> > >Then:
> > >
> > >  CMake Error in core/astar/src/CMakeLists.txt:
> > >   Cannot find source file:
> > >
> > >     OBJECT
> > >
> > >   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm
> .hpp
> > >   .hxx .in .txx
> > >
> > >and the same message repeated for:
> > >
> > >  CMake Error in core/dijkstra/src/CMakeLists.txt:
> > >  CMake Error in core/shooting_star/src/CMakeLists.txt:
> > >  CMake Error in core/trsp/src/CMakeLists.txt:
> > >
> > >And finally:
> > >
> > >  -- Build files have been written to: /usr/src/pgrouting/pgrouting/b
> > >
> > >With cmake exit code being 1 and `make` returning:
> > >
> > >  make: *** No targets specified and no makefile found.  Stop.
> > >
> > >This is invoking cmake from outside the source dir, ie:
> > >
> > >  mkdir b; cd b; cmake -DWITH_TSP=ON -DWITH_DD=ON ..
> > >
> > >With current seq-devel-2_0 (commit
> 825b40e049e4b21787c27f00aae49b0382279842)
> > >
> > >--strk;
> > >_______________________________________________
> > >pgrouting-dev mailing list
> > >pgrouting-dev at lists.osgeo.org
> > >http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
> > >
> >
> > _______________________________________________
> > pgrouting-dev mailing list
> > pgrouting-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
> --
>
>  http://www.cartodb.com - Map, analyze and build applications with your
> data
>
>                                        ~~ http://strk.keybit.net
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20130326/47c0b2f0/attachment.html>


More information about the pgrouting-dev mailing list