Natalie Happenhofer
2009-06-09 13:31:04 UTC
Hi everybody,
IŽd like to build a mixed language programm with CMake, more specifically, I have a C++ and a Fortran90 source file I want to link:
tp500main.cxx and electro1.f90
IŽm just wondering how it is done with CMake. The point is, I need to compile the sources separately with the corresponding compiler and then link it together.
I tried the following:
cmake_minimum_required(VERSION 2.6)
project(tp500)
enable_language(Fortran)
try_compile(electro1.f90)
try_compile(tp500main.cpp)
target_link_libraries(tp500 electro1.o tp500main.o)
which is, I suppose, a rather crude approach, but I hope it shows what IŽm trying to do..
thanks a lot for any piece of advice,
Natalie Happenhofer
_________________________________________________________________
Disfruta los mejores videos de MSN mientras chateas
http://messengertv.msn.com/mkt/es-xl/
IŽd like to build a mixed language programm with CMake, more specifically, I have a C++ and a Fortran90 source file I want to link:
tp500main.cxx and electro1.f90
IŽm just wondering how it is done with CMake. The point is, I need to compile the sources separately with the corresponding compiler and then link it together.
I tried the following:
cmake_minimum_required(VERSION 2.6)
project(tp500)
enable_language(Fortran)
try_compile(electro1.f90)
try_compile(tp500main.cpp)
target_link_libraries(tp500 electro1.o tp500main.o)
which is, I suppose, a rather crude approach, but I hope it shows what IŽm trying to do..
thanks a lot for any piece of advice,
Natalie Happenhofer
_________________________________________________________________
Disfruta los mejores videos de MSN mientras chateas
http://messengertv.msn.com/mkt/es-xl/