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/
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to