<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I do have Fortran enabled. Here is a much
simplified CMakeLists.txt that has this problem. Again, everything works on
Linux/Unix, but I get errors when using CMakeSetup on Windows.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PROJECT(test_fort CXX Fortran)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># C++ files<BR>SET(CXX_TEST_SRCS
test1.cpp)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># Fortran files<BR>SET(FORT_TEST_SRCS test2.f
test3.f test4.f)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>ADD_DEFINITIONS(-DTEST_FORT)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>ADD_LIBRARY(test_fort ${CXX_TEST_SRCS}
${FORT_TEST_SRCS})</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>SET_TARGET_PROPERTIES(test_fort PROPERTIES
LINKER_LANGUAGE CXX)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>--Mike<BR></FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=billlist@nycap.rr.com href="mailto:billlist@nycap.rr.com">William A.
Hoffman</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=mbs@iprovo.net
href="mailto:mbs@iprovo.net">Michael Stephenson</A> ; <A title=cmake@cmake.org
href="mailto:cmake@cmake.org">cmake@cmake.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, February 06, 2006 2:32
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [CMake] CMake C++ and
Fortran mixed language project fails</DIV>
<DIV><BR></DIV>At 10:18 PM 2/2/2006, Michael Stephenson wrote:<BR>
<BLOCKQUOTE class=cite cite="" type="cite"><FONT face="Arial, Helvetica"
size=2>I have a mixed language C++ and Fortran project that works on Linux.
I'm now trying to run it on Windows. CMakeSetup generates the following
errors:<BR> <BR>CMakeError: Error required internal CMake variable not
set, cmake may be not be built correctly.<BR>Missing variable
is:<BR>CMAKE_Fortran_FLAGS_RELEASE<BR> <BR>This message is repeated for
CMAKE_Fortran_FLAGS_MINSIZEREL, CMAKE_Fortran_FLAGS_DEBUG, and
CMAKE_Fortran_FLAGS_RELWITHDEBINFO.<BR> <BR>I then get this error
message:<BR> <BR>CMakeError: Internal CMake error, TryCompile
generation of cmake failed.<BR> <BR>and finally:<BR> <BR>The
Fortran compiler "ifort.exe" is not able to compile a simple test
program.<BR>It fails with the following
output:<BR>(blank)<BR> <BR>CMake will not be able to correctly generate
this project.<BR> <BR>Since CMake is able to find the Fortran compiler,
why doesn't it set the *Release, etc. flags and compile the test
program.<BR> <BR>--Mike Stephenson<BR> </FONT></BLOCKQUOTE>You
should enable Fortran like this:<BR>PROJECT(testf Fortran)<BR>There is a test
in CMake/Tests/Fortran.<BR><BR>-Bill<BR></BLOCKQUOTE></BODY></HTML>