[CMake] Fortran compiler check failing with Intel ifort 10.0 on OSX

Nico Galoppo ngaloppo+cmake at gmail.com
Sun Oct 7 01:12:57 EDT 2007


Hi,

I'm trying to get the FindBLAS macros to work with cmake (as
originally posted by Alan W. Irwin and patched here:
http://www.mail-archive.com/cmake@cmake.org/msg08081.html), with the
following CMakeLists.txt:

PROJECT(SOFTPHYSICS Fortran)

# Some custom cmake macros
SET( CMAKE_MODULE_PATH ${SOFTPHYSICS_BINARY_DIR} )
INCLUDE (FindBLAS)


I'm doing this on an Intel Mac running OSX 10.4 (Tiger).
Unfortunately, the basic fortran test compile fails (see below). Does
anyone know where the culprit could be? Is this specific to the Intel
Fortran compiler?

Thanks!

--nico

=================================================================================


chocomousse:~/code/softphysics/build nico$ cmake ../ -G Xcode
--debug-trycompile --debug-output
debug trycompile on
Running with debug output on.
-- Check for working Fortran compiler: /opt/intel/fc/10.0.020/bin/ifort
-- Check for working Fortran compiler:
/opt/intel/fc/10.0.020/bin/ifort -- broken
CMake Error: Error in cmake code at
/sw/share/cmake-2.4/Modules/CMakeTestFortranCompiler.cmake:25:
MESSAGE The Fortran compiler "/opt/intel/fc/10.0.020/bin/ifort" is not
able to compile a simple test program.

Determining if the Fortran compiler works failed with the following output:
** BUILD FAILED **
=== BUILDING AGGREGATE TARGET XCODE_DEPEND_HELPER WITH CONFIGURATION Debug ===

Checking Dependencies...

PhaseScriptExecution
/Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112BFF0112BFF0112BFF0000.sh
   cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
   /bin/sh -c /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112BFF0112BFF0112BFF0000.sh
make: `CMakeFiles/cmake.check_cache' is up to date.

PhaseScriptExecution
/Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112C650112C650112C650000.sh
   cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
   /bin/sh -c /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp/build/CMAKE_TRY_COMPILE.build/Debug/XCODE_DEPEND_HELPER.build/Script-112C650112C650112C650000.sh
make -C /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp -f
/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMakeScripts/XCODE_DEPEND_HELPER.make
all.Debug
/bin/rm -f /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec


=== BUILDING NATIVE TARGET cmTryCompileExec WITH CONFIGURATION Debug ===

Checking Dependencies...

PhaseScriptExecution
/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Script-11357D011357D011357D0000.sh
   cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
   /bin/sh -c /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Script-11357D011357D011357D0000.sh
make: `CMakeFiles/cmake.check_cache' is up to date.

CompileC /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Objects-normal/i386/testFortranCompiler.o
/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f
normal i386 c++ com.apple.compilers.gcc.4_0
   cd /Users/nico/Code/softphysics/build/CMakeFiles/CMakeTmp
   /usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -Wno-trigraphs
-fpascal-strings -fasm-blocks -O0 -DCMAKE_INTDIR=\"Debug\"
-fmessage-length=0 -Wmost -Wno-four-char-constants
-Wno-unknown-pragmas -O0 -mdynamic-no-pic
-F/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/Debug
-I/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/Debug/include
-I/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/DerivedSources
-c /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f
-o /Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/Objects-normal/i386/testFortranCompiler.o
/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f:3:18:
warning: character constant too long for its type
/Users/nico/code/softphysics/build/CMakeFiles/CMakeTmp/testFortranCompiler.f:2:
error: 'PROGRAM' does not name a type



-- 
Nico Galoppo :: http://www.ngaloppo.org


More information about the CMake mailing list