One of the arguments to gcc is &quot;-x c++&quot; -- and the Xcode build step starts with a &quot;CompileC&quot; operation... it looks like it&#39;s trying to compile the fortran file as C++...?<br><br>Is anybody else out there using a fortran compiler with Xcode? If so, perhaps you could chime in with some advice on how you got it to work...?
<br><br><br><br><div><span class="gmail_quote">On 10/7/07, <b class="gmail_sendername">Nico Galoppo</b> &lt;<a href="mailto:ngaloppo+cmake@gmail.com">ngaloppo+cmake@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I&#39;m trying to get the FindBLAS macros to work with cmake (as<br>originally posted by Alan W. Irwin and patched here:<br><a href="http://www.mail-archive.com/cmake@cmake.org/msg08081.html">http://www.mail-archive.com/cmake@cmake.org/msg08081.html
</a>), with the<br>following CMakeLists.txt:<br><br>PROJECT(SOFTPHYSICS Fortran)<br><br># Some custom cmake macros<br>SET( CMAKE_MODULE_PATH ${SOFTPHYSICS_BINARY_DIR} )<br>INCLUDE (FindBLAS)<br><br><br>I&#39;m doing this on an Intel Mac running OSX 
10.4 (Tiger).<br>Unfortunately, the basic fortran test compile fails (see below). Does<br>anyone know where the culprit could be? Is this specific to the Intel<br>Fortran compiler?<br><br>Thanks!<br><br>--nico<br><br>=================================================================================
<br><br><br>chocomousse:~/code/softphysics/build nico$ cmake ../ -G Xcode<br>--debug-trycompile --debug-output<br>debug trycompile on<br>Running with debug output on.<br>-- Check for working Fortran compiler: /opt/intel/fc/10.0.020/bin/ifort
<br>-- Check for working Fortran compiler:<br>/opt/intel/fc/10.0.020/bin/ifort -- broken<br>CMake Error: Error in cmake code at<br>/sw/share/cmake-2.4/Modules/CMakeTestFortranCompiler.cmake:25:<br>MESSAGE The Fortran compiler &quot;/opt/intel/fc/10.0.020/bin/ifort&quot; is not
<br>able to compile a simple test program.<br><br>Determining if the Fortran compiler works failed with the following output:<br>** BUILD FAILED **<br>=== BUILDING AGGREGATE TARGET XCODE_DEPEND_HELPER WITH CONFIGURATION Debug ===
<br><br>Checking Dependencies...<br><br>PhaseScriptExecution<br>/Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112BFF0112BFF0112BFF0000.sh<br>&nbsp;&nbsp; cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
<br>&nbsp;&nbsp; /bin/sh -c /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112BFF0112BFF0112BFF0000.sh<br>make: `CMakeFiles/cmake.check_cache&#39; is up to date.
<br><br>PhaseScriptExecution<br>/Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112C650112C650112C650000.sh<br>&nbsp;&nbsp; cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
<br>&nbsp;&nbsp; /bin/sh -c /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112C650112C650112C650000.sh<br>make -C /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp -f
<br>/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMakeScripts/XCODE_DEPEND_HELPER.make<br>all.Debug<br>/bin/rm -f /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec<br><br><br>=== BUILDING NATIVE TARGET cmTryCompileExec WITH CONFIGURATION Debug ===
<br><br>Checking Dependencies...<br><br>PhaseScriptExecution<br>/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Script-11357D011357D011357D0000.sh<br>&nbsp;&nbsp; cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
<br>&nbsp;&nbsp; /bin/sh -c /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Script-11357D011357D011357D0000.sh<br>make: `CMakeFiles/cmake.check_cache&#39; is up to date.<br>
<br>CompileC /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Objects-normal/i386/testFortranCompiler.o<br>/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f
<br>normal i386 c++ com.apple.compilers.gcc.4_0<br>&nbsp;&nbsp; cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp<br>&nbsp;&nbsp; /usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -Wno-trigraphs<br>-fpascal-strings -fasm-blocks -O0 -DCMAKE_INTDIR=\&quot;Debug\&quot;
<br>-fmessage-length=0 -Wmost -Wno-four-char-constants<br>-Wno-unknown-pragmas -O0 -mdynamic-no-pic<br>-F/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/Debug<br>-I/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/Debug/include
<br>-I/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/DerivedSources<br>-c /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f<br>-o /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Objects-normal/i386/testFortranCompiler.o
<br>/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f:3:18:<br>warning: character constant too long for its type<br>/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f:2:
<br>error: &#39;PROGRAM&#39; does not name a type<br><br><br><br>--<br>Nico Galoppo :: <a href="http://www.ngaloppo.org">http://www.ngaloppo.org</a><br>_______________________________________________<br>CMake mailing list
<br><a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>