How to generate xcodeproj file correctly for Xcode?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to generate xcodeproj file correctly for Xcode?

董理
Hi all,

I am trying move my project from Linux to Mac. I have modified some cmake files to successfully generate Makefile, but I'd like generate xcodeproj file for use in Xcode. A few errors appeared, as following:

1.  Fortran compiler
In the command line output of running "cmake -G Xcode ../<project src>", I can see that the Fortran compiler is 32-bit

-- Checking whether /opt/intel/Compiler/11.1/076/bin/ia32/ifort supports Fortran 90
-- Checking whether /opt/intel/Compiler/11.1/076/bin/ia32/ifort supports Fortran 90 -- yes

but when I built project in Xcode, I found the actual Fortran compiler is "/Developer/usr/local/bin/ifort-11.1-base/bin/intel64/ifort". It is so strange. Why is that?

2.  Fortran flags
I have added "-r8" to CMAKE_Fortran_FLAGS. It took effect when generating Makefile, but not when generating xcodeproj.

3. include path and module path are not correct.

Thanks for help!

DONG Li




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: How to generate xcodeproj file correctly for Xcode?

Brad King
DONG Li wrote:
> I am trying move my project from Linux to Mac. I have modified some
> cmake files to successfully generate Makefile, but I'd like generate
> xcodeproj file for use in Xcode. A few errors appeared, as following:

AFAIK the Xcode generator is totally untested with the Intel Fortran
plugin for Xcode, and is not currently supported by CMake.

> 1.  Fortran compiler
> In the command line output of running "cmake -G Xcode ../<project src>",
> I can see that the Fortran compiler is 32-bit
>
> -- Checking whether /opt/intel/Compiler/11.1/076/bin/ia32/ifort supports
> Fortran 90
> -- Checking whether /opt/intel/Compiler/11.1/076/bin/ia32/ifort supports
> Fortran 90 -- yes
>
> but when I built project in Xcode, I found the actual Fortran compiler
> is "/Developer/usr/local/bin/ifort-11.1-base/bin/intel64/ifort". It is
> so strange. Why is that?

Currently the Xcode generator does not correctly detect the compiler
that Xcode uses behind the scenes.  I've been working on this problem
for the C and C++ compilers but it is non-trivial to fix and has not
really bitten anyone yet.

> 2.  Fortran flags
> I have added "-r8" to CMAKE_Fortran_FLAGS. It took effect when
> generating Makefile, but not when generating xcodeproj.
>
> 3. include path and module path are not correct.

As I said above, CMake has no support for Fortran with Xcode right now.
I think it happens to work in some simple cases.  You can submit a
feature request, but I don't know when we'll get to it.

-Brad
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake