如何使用CMake -G Xcode混合使用C ++和Fortran?

时间:2016-12-13 13:39:50

标签: c++ xcode cmake fortran

我创建了一个简单的C ++文件,我调用了Fortran子例程。在没有Xcode IDE的情况下使用CMake,一切都编译得很好,而尝试使用命令添加Xcode IDE:

cmake .. -G Xcode 

返回以下错误:

Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" did not produce an executable in ...
  

有人可以给我一个如何调试这个的暗示吗?

源文件由:

给出

的CMakeLists.txt

cmake_minimum_required(VERSION 3.7.0)
project(mixing CXX Fortran)

add_executable(mixing
testC.cpp
testF.f
)

testC.cpp

#include <iostream>

using namespace std;

extern"C" {
void fortfunc_(int *ii, float *ff);
}

int main()
{

   int ii=5;
   float ff=5.5;

   fortfunc_(&ii, &ff);

   return 0;
}

testF.f

      subroutine fortfunc(ii,ff)
      integer ii
      real*4  ff

      write(6,100) ii, ff
 100  format('ii=',i2,' ff=',f6.3)

      return
      end

CMakeFiles / CMakeError.log

    Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" did not produce an executable in "/Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran".

CMakeFiles / CMakeOutput.log

两个文件之间的差异

Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded.
Compiler:  
Build flags: 
Id flags: 
The output was:
0
=== BUILD TARGET CompilerIdFortran OF PROJECT CompilerIdFortran WITH THE DEFAULT CONFIGURATION (Debug) ===
Check dependencies
warning: no rule to process file '/Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CMakeFortranCompilerId.F' of type sourcecode.fortran.f90 for architecture x86_64
Write auxiliary files
write-file /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
chmod 0755 /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
PhaseScriptExecution Run\ Script CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
    cd /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran
    /bin/sh -c /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
GCC_VERSION=com.apple.compilers.llvm.clang.1_0
** BUILD SUCCEEDED **
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded.
Compiler:  
Build flags: 
Id flags: 
The output was:
0
=== BUILD TARGET CompilerIdFortran OF PROJECT CompilerIdFortran WITH THE DEFAULT CONFIGURATION (Debug) ===
Check dependencies
warning: no rule to process file '/Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CMakeFortranCompilerId.F' of type sourcecode.fortran.f90 for architecture x86_64
Write auxiliary files
write-file /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
chmod 0755 /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
PhaseScriptExecution Run\ Script CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
    cd /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran
    /bin/sh -c /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/CompilerIdFortran.build/Debug/CompilerIdFortran.build/Script-2C8FEB8E15DC1A1A00E56A5D.sh
GCC_VERSION=com.apple.compilers.llvm.clang.1_0
** BUILD SUCCEEDED **
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded.
Compiler: /opt/local/bin/gfortran 
Build flags: 
Id flags: -v
The output was:
0
Driving: /opt/local/bin/gfortran -v CMakeFortranCompilerId.F -mmacosx-version-min=10.12.1 -l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=/opt/local/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/lto-wrapper
Target: x86_64-apple-darwin16
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc6/gcc6/work/gcc-6.2.0/configure --prefix=/opt/local --build=x86_64-apple-darwin16 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc6 --includedir=/opt/local/include/gcc6 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-6 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-6 --with-gxx-include-dir=/opt/local/include/gcc6/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc6 6.2.0_2'
Thread model: posix
gcc version 6.2.0 (MacPorts gcc6 6.2.0_2) 
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/f951 CMakeFortranCompilerId.F -ffixed-form -cpp=/var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccYnQZ27.f90 -quiet -v -D__DYNAMIC__ CMakeFortranCompilerId.F -fPIC -quiet -dumpbase CMakeFortranCompilerId.F -mmacosx-version-min=10.12.1 -mtune=core2 -auxbase CMakeFortranCompilerId -version -fintrinsic-modules-path /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/finclude -o /var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccfUnwPI.s
GNU Fortran (MacPorts gcc6 6.2.0_2) version 6.2.0 (x86_64-apple-darwin16)
    compiled by GNU C version 6.2.0, GMP version 6.1.1, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.14 or 0.13
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../../../x86_64-apple-darwin16/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/finclude
 /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/include
 /opt/local/include
 /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/include-fixed
 /usr/include
End of search list.
GNU Fortran2008 (MacPorts gcc6 6.2.0_2) version 6.2.0 (x86_64-apple-darwin16)
    compiled by GNU C version 6.2.0, GMP version 6.1.1, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.14 or 0.13
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2'
 /opt/local/bin/as -v -arch x86_64 -force_cpusubtype_ALL -o /var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccExsLaB.o /var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccfUnwPI.s
Apple Inc version cctools-886, GNU assembler version 1.38
Reading specs from /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../libgfortran.spec
rename spec lib to liborig
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2'
COMPILER_PATH=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin16/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/
LIBRARY_PATH=/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/collect2 -dynamic -arch x86_64 -macosx_version_min 10.12.1 -weak_reference_mismatches non-weak -o a.out -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0 -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../.. /var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccExsLaB.o -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
collect2 version 6.2.0
/opt/local/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.12.1 -weak_reference_mismatches non-weak -o a.out -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0 -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../.. /var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccExsLaB.o -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
@(#)PROGRAM:ld  PROJECT:ld64-264.3.102
configured to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 (tvOS)
Library search paths:
    /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0
    /opt/local/lib/gcc6
    /usr/lib
    /usr/local/lib
Framework search paths:
    /Library/Frameworks/
    /System/Library/Frameworks/
 /opt/local/bin/nm -n /var/folders/gn/07hkp3pd0r53c8sqglm6_3g40000gn/T//ccExsLaB.o
Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.out"
The Fortran compiler identification is GNU, found in "/Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/3.7.0/CompilerIdFortran/a.out"
Determining if the Fortran compiler works passed with the following output:
Change Dir: /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_ec5cc/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_ec5cc.dir/build.make CMakeFiles/cmTC_ec5cc.dir/build
Building Fortran object CMakeFiles/cmTC_ec5cc.dir/testFortranCompiler.f.o
/opt/local/bin/gfortran     -c /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_ec5cc.dir/testFortranCompiler.f.o
Linking Fortran executable cmTC_ec5cc
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ec5cc.dir/link.txt --verbose=1
/opt/local/bin/gfortran       CMakeFiles/cmTC_ec5cc.dir/testFortranCompiler.f.o  -o cmTC_ec5cc 
Detecting Fortran compiler ABI info compiled with the following output:
Change Dir: /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_61cbd/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_61cbd.dir/build.make CMakeFiles/cmTC_61cbd.dir/build
Building Fortran object CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o
/opt/local/bin/gfortran     -c /opt/local/share/cmake-3.7/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o
Linking Fortran executable cmTC_61cbd
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_61cbd.dir/link.txt --verbose=1
/opt/local/bin/gfortran    -v -Wl,-v   CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o  -o cmTC_61cbd  
Driving: /opt/local/bin/gfortran -v -Wl,-v CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o -o cmTC_61cbd -mmacosx-version-min=10.12.1 -l gfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=/opt/local/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/lto-wrapper
Target: x86_64-apple-darwin16
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc6/gcc6/work/gcc-6.2.0/configure --prefix=/opt/local --build=x86_64-apple-darwin16 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc6 --includedir=/opt/local/include/gcc6 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-6 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-6 --with-gxx-include-dir=/opt/local/include/gcc6/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc6 6.2.0_2'
Thread model: posix
gcc version 6.2.0 (MacPorts gcc6 6.2.0_2) 
Reading specs from /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../libgfortran.spec
rename spec lib to liborig
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_61cbd' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2'
COMPILER_PATH=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin16/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/
LIBRARY_PATH=/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_61cbd' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/collect2 -dynamic -arch x86_64 -macosx_version_min 10.12.1 -weak_reference_mismatches non-weak -o cmTC_61cbd -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0 -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../.. -v CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
collect2 version 6.2.0
/opt/local/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.12.1 -weak_reference_mismatches non-weak -o cmTC_61cbd -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0 -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../.. -v CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v
@(#)PROGRAM:ld  PROJECT:ld64-264.3.102
configured to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 (tvOS)
@(#)PROGRAM:ld  PROJECT:ld64-264.3.102
configured to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 (tvOS)
Library search paths:
    /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0
    /opt/local/lib/gcc6
    /usr/lib
    /usr/local/lib
Framework search paths:
    /Library/Frameworks/
    /System/Library/Frameworks/
 /opt/local/bin/nm -n CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o
Parsed Fortran implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command:"/usr/bin/make" "cmTC_61cbd/fast"]
  ignore line: [/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_61cbd.dir/build.make CMakeFiles/cmTC_61cbd.dir/build]
  ignore line: [Building Fortran object CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o]
  ignore line: [/opt/local/bin/gfortran     -c /opt/local/share/cmake-3.7/Modules/CMakeFortranCompilerABI.F -o CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o]
  ignore line: [Linking Fortran executable cmTC_61cbd]
  ignore line: [/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_61cbd.dir/link.txt --verbose=1]
  ignore line: [/opt/local/bin/gfortran    -v -Wl,-v   CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o  -o cmTC_61cbd  ]
  ignore line: [Driving: /opt/local/bin/gfortran -v -Wl,-v CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o -o cmTC_61cbd -mmacosx-version-min=10.12.1 -l gfortran -shared-libgcc]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/opt/local/bin/gfortran]
  ignore line: [COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/lto-wrapper]
  ignore line: [Target: x86_64-apple-darwin16]
  ignore line: [Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc6/gcc6/work/gcc-6.2.0/configure --prefix=/opt/local --build=x86_64-apple-darwin16 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc6 --includedir=/opt/local/include/gcc6 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-6 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-6 --with-gxx-include-dir=/opt/local/include/gcc6/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc6 6.2.0_2']
  ignore line: [Thread model: posix]
  ignore line: [gcc version 6.2.0 (MacPorts gcc6 6.2.0_2) ]
  ignore line: [Reading specs from /opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../libgfortran.spec]
  ignore line: [rename spec lib to liborig]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_61cbd' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2']
  ignore line: [COMPILER_PATH=/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/libexec/gcc/x86_64-apple-darwin16/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/]
  ignore line: [LIBRARY_PATH=/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/:/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../../]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_61cbd' '-mmacosx-version-min=10.12.1' '-shared-libgcc' '-mtune=core2']
  link line: [ /opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/collect2 -dynamic -arch x86_64 -macosx_version_min 10.12.1 -weak_reference_mismatches non-weak -o cmTC_61cbd -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0 -L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../.. -v CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o -lgfortran -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lquadmath -lm -lgcc_ext.10.5 -lgcc -lSystem -v]
    arg [/opt/local/libexec/gcc/x86_64-apple-darwin16/6.2.0/collect2] ==> ignore
    arg [-dynamic] ==> ignore
    arg [-arch] ==> ignore
    arg [x86_64] ==> ignore
    arg [-macosx_version_min] ==> ignore
    arg [10.12.1] ==> ignore
    arg [-weak_reference_mismatches] ==> ignore
    arg [non-weak] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_61cbd] ==> ignore
    arg [-L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0] ==> dir [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0]
    arg [-L/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../..] ==> dir [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../..]
    arg [-v] ==> ignore
    arg [CMakeFiles/cmTC_61cbd.dir/CMakeFortranCompilerABI.F.o] ==> ignore
    arg [-lgfortran] ==> lib [gfortran]
    arg [-no_compact_unwind] ==> ignore
    arg [-lSystem] ==> lib [System]
    arg [-lgcc_ext.10.5] ==> lib [gcc_ext.10.5]
    arg [-lgcc] ==> lib [gcc]
    arg [-lquadmath] ==> lib [quadmath]
    arg [-lm] ==> lib [m]
    arg [-lgcc_ext.10.5] ==> lib [gcc_ext.10.5]
    arg [-lgcc] ==> lib [gcc]
    arg [-lSystem] ==> lib [System]
    arg [-v] ==> ignore
  Library search paths: [;/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0;/opt/local/lib/gcc6;/usr/lib;/usr/local/lib]
  Framework search paths: [;/Library/Frameworks/;/System/Library/Frameworks/]
  remove lib [System]
  remove lib [gcc_ext.10.5]
  remove lib [gcc]
  remove lib [gcc_ext.10.5]
  remove lib [gcc]
  remove lib [System]
  collapse library dir [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0] ==> [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0]
  collapse library dir [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0/../../..] ==> [/opt/local/lib/gcc6]
  collapse library dir [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0] ==> [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0]
  collapse library dir [/opt/local/lib/gcc6] ==> [/opt/local/lib/gcc6]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  collapse library dir [/usr/local/lib] ==> [/usr/local/lib]
  collapse framework dir [/Library/Frameworks/] ==> [/Library/Frameworks]
  collapse framework dir [/System/Library/Frameworks/] ==> [/System/Library/Frameworks]
  implicit libs: [gfortran;quadmath;m]
  implicit dirs: [/opt/local/lib/gcc6/gcc/x86_64-apple-darwin16/6.2.0;/opt/local/lib/gcc6;/usr/lib;/usr/local/lib]
  implicit fwks: [/Library/Frameworks;/System/Library/Frameworks]
Determining if the Fortran compiler supports Fortran 90 passed with the following output:
Change Dir: /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_e62a9/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_e62a9.dir/build.make CMakeFiles/cmTC_e62a9.dir/build
Building Fortran object CMakeFiles/cmTC_e62a9.dir/testFortranCompilerF90.f90.o
/opt/local/bin/gfortran     -c /Users/Knowledge/Developer/Tutorials/MixingFortranAndC/XCode_CMake_FortranMixing/build/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 -o CMakeFiles/cmTC_e62a9.dir/testFortranCompilerF90.f90.o
Linking Fortran executable cmTC_e62a9
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e62a9.dir/link.txt --verbose=1
/opt/local/bin/gfortran       CMakeFiles/cmTC_e62a9.dir/testFortranCompilerF90.f90.o  -o cmTC_e62a9 

CMAKE stdout

-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- The Fortran compiler identification is unknown
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_Fortran_COMPILER could be found.

0 个答案:

没有答案