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 11:42:48 +0200
- Organization: GeometryFactory
Le mercredi 27 octobre 2010 11:26:05, stevepny a écrit :
> Ok I tried that, but I get an error when running "cmake ." (see below). I
> tried commenting out the offending line that specifies the linker, but then
> I don't get an executable when I run make. I think I had -DMOM2_ELF in
> there because it was in the example script from which I adapted. I suppose
> it is unnecessary so I'll remove it.
>
> -- Build type: Release
> -- USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
> -- USING EXEFLAGS = ' '
> -- Targetting Unix Makefiles
> -- Using /usr/bin/c++ compiler.
> CMake Error at CMakeLists.txt:28 (SET_TARGET_PROPERTIES):
> set_target_properties Can not find target to add properties to: local_exe
>
>
> -- Configuring incomplete, errors occurred!
Ok, lets forget CreateSingleSourceProgram. Here is a new proposal:
# To indicate that this is mixed language project
PROJECT( mom2_elf CXX Fortran )
# C++ files
SET(CXX_TEST_SRCS local_clib.cpp)
# Fortran files
SET(FORT_TEST_SRCS letkfio.f90)
ADD_DEFINITIONS(-DMOM2_ELF)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if ( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW )
endif()
find_package(CGAL REQUIRED COMPONENTS Core )
include( ${CGAL_USE_FILE} )
include( CGAL_CreateSingleSourceCGALProgram )
include_directories (BEFORE ../../include)
add_executable(local_exe ${CXX_TEST_SRCS} ${FORT_TEST_SRCS} )
target_link_libraries(local_exe ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}
)
# To explicitly specify that your MAIN is C++'s main.
SET_TARGET_PROPERTIES(local_exe PROPERTIES LINKER_LANGUAGE CXX)
--
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.