Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: Compile with C++ main and Fortran module
- Date: Wed, 27 Oct 2010 23:31:17 +0200
- Organization: GeometryFactory
Le mercredi 27 octobre 2010 22:58:20, stevepny a écrit :
> Ah, great! cmake completes now. And, make is compiling. There is one last
> issue though, it doesn't find the boost library libboost_date_time, which
> is one of the built packages like libboost_thread. How do I specify this
> in cmake?
>
> In my makefile I used this library:
> # Boost libraries:
> CPPLIB = -L/homes/metogra/spenny/boost_1_44_0/stage/lib -lboost_date_time
> # Link executable
> local_exe.x : letkfio.o localization.o
> $(LN) $? -o $@ $(F90LIB) $(CPPLIB) $(CPPINC)
The answer is here:
cmake --help-module FindBoost
You need to add, before the add_executable(...):
find_package( Boost REQUIRED thread date_time )
# Note that you can add other boost components
target_link_libraries(local_exe ${Boost_LIBRARIES})
> I'll note: I also had to change the function calls in the C++ main routine
> to the format __{moduleName}_MOD_{functionName} for gfortran. Is there a
> way to specify within the CMakeLists.txt file that I'd like to use the
> pgf90 fortran compiler? That would allow me to avoid renaming all my
> fortran function calls, since pgf90 uses the format
> {moduleName}_{functionName}_.
>
> Thanks very much for your assistance!
It seems CMake has a module to help the detection and use of the Fortran
C API. Have a look at the documentation of the module FortranCInterface:
cmake --help-module FortranCInterface
I hope you will manage to use that module, because I do not know Fortran and
I
cannot well understand the documentation of that CMake module.
--
Laurent Rineau, PhD
Release Manager of the CGAL Project http://www.cgal.org/
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
- [cgal-discuss] Compile with C++ main and Fortran module, stevepny, 10/25/2010
- Re: [cgal-discuss] Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/25/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/26/2010
- Re: [cgal-discuss] Re: Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/26/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/27/2010
- Re: [cgal-discuss] Re: Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/27/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/27/2010
- Re: [cgal-discuss] Re: Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/27/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/27/2010
- Re: [cgal-discuss] Re: Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/27/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/27/2010
- Re: [cgal-discuss] Re: Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/27/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/27/2010
- Re: [cgal-discuss] Re: Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/26/2010
- [cgal-discuss] Re: Compile with C++ main and Fortran module, stevepny, 10/26/2010
- Re: [cgal-discuss] Compile with C++ main and Fortran module, Laurent Rineau (GeometryFactory), 10/25/2010
Archive powered by MHonArc 2.6.16.