<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>



<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>


Hi everybody,<br>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:<br>tp500main.cxx and electro1.f90<br><br>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. <br>I tried the following:<br><br>cmake_minimum_required(VERSION 2.6)<br>project(tp500)<br><br>enable_language(Fortran)<br><br>try_compile(electro1.f90)<br>try_compile(tp500main.cpp)<br><br>target_link_libraries(tp500 electro1.o tp500main.o)<br><br><br>which is, I suppose, a rather crude approach, but I hope it shows what I´m trying to do.. <br><br>thanks a lot for any piece of advice,<br>Natalie Happenhofer<br><br><br><a href="http://www.ie8.msn.com/microsoft/internet-explorer-8/es-xl/ie8.aspx"><br></a><br /><hr />¿Quieres conocerte mejor? <a href='http://www.descubrewindowslive.com/' target='_new'>¡Conoce lo que Windows Live tiene especialmente para ti!</a></body>
</html>