Hi,

I am building some Fortran sources and on Mac I want to make the resulting executable portable back to 10.7.

So I have:

if (APPLE)
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.7) # Earliest version we can support with C++11 & libc++ set (CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
endif (APPLE)

in my CMakeLists.txt.

I am building on a 10.8 system with the 10.9 SDK installed.

This all works as expected with the C and C++ sources in the project but the Fortran compiles are not being passed the relevant options:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
-mmacosx_version_min=10.7

The Fortran compiler is the MacPorts gcc49 itself built from sources using the same options so that the distributable libraries reference the correct system library function versions.

So what am I missing? A brief scan of the CMake sources looks like it should be doing this right for GNU compilers as the compiler tests should check for those options being supported and supply them.

Do I have to add these options to the FFLAGS in my CMakeLists.txt?

Regards
Bill.
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to