<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>I&#8217;ve just started using CMake and have great hopes for it making my life simpler.&nbsp; I currently have a windows console project that mixes C&#43;&#43; and Fortran code.&nbsp; I have the main body of the code (in Fortran), an interface to display code written in C&#43;&#43;(in
Fortran), and some display code (C&#43;&#43;).&nbsp; I have used Visual Studio .NET 2003 and Intel Fortran 9.0 to build and link these successfully already, by building the project files and tweaking the appropriate build settings.&nbsp; I&#8217;d like to switch to cmake generated
build files so I can cross compile on Linux with a minimal amount of effort.&nbsp; I could build makefiles for the Linux side, but then I&#8217;d have the nightmare of keeping both builds in sync.</div>
<div>&nbsp;</div>
<div>I have created the CMakeLists.txt files for each of the subprojects (Fortran executable, Fortran Lib, and C&#43;&#43; Lib).&nbsp; I&#8217;ve also generated nmake makefiles for each of the subprojects and used them to build with expected results.&nbsp; Both the Fortran and C&#43;&#43;
libs are built successfully and the Fortran executable fails complaining about unresolved externals (makes sense since I didn&#8217;t point it to the libs yet).&nbsp; When I add the code to the Fortran executable CMakeLists.txt to add_subdir for each of the static libs,
and add the code to link the static libs things start to fall apart.</div>
<div>&nbsp;</div>
<div>When I generate the make files my C&#43;&#43; lib no longer builds.&nbsp; Looking around online I discovered the FortranCInterface and the FortranCInterface_VERIFY(CXX) cmake command.&nbsp; I added an include for the FortranCInterface and the FortranCInterface_VERIFY(CXX)
to the executable CMakeLists.txt file figuring that might provide some insight.&nbsp; When I try to run cmake on that CMakeLists.txt file cmake complains that it could not compile the simple test file for the verify.</div>
<div>&nbsp;</div>
<div>I know I can mix C&#43;&#43; and Fortran using the compilers I have, I&#8217;ve done it.&nbsp; I must be missing some cmake magic.&nbsp; Hopefully it is something stupid and someone will be able to see it and point it out to me.</div>
<div>&nbsp;</div>
<div>Thanks in advance,</div>
<div>Michael Caron</div>
<div>&nbsp;</div>
</font>
</body>
</html>