summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineFortranCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-15 20:21:50 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-22 19:14:33 (GMT)
commit965a69dcaa0b67c730f45487abeee97ef652d545 (patch)
tree0b16a50604aa49212594137706c22b78479fb28f /Modules/CMakeDetermineFortranCompiler.cmake
parent9a9e1ee98d59ba1ed2a89a2858224a7f8a92bbf6 (diff)
downloadCMake-965a69dcaa0b67c730f45487abeee97ef652d545.zip
CMake-965a69dcaa0b67c730f45487abeee97ef652d545.tar.gz
CMake-965a69dcaa0b67c730f45487abeee97ef652d545.tar.bz2
Xcode: Detect the compiler id and tool location
Configure a hand-generated Xcode project to build the compiler id source file since we cannot run the compiler command-line tool directly. Add a post-build shell script phase to print out the compiler toolset build setting. Run xcodebuild to compile the identification binary. Parse the full path to the compiler tool from the xcodebuild output.
Diffstat (limited to 'Modules/CMakeDetermineFortranCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 5bd514a..45213b9 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -30,6 +30,8 @@ if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
set(CMAKE_Fortran_PLATFORM_ID "Windows")
set(CMAKE_Fortran_COMPILER_ID "Intel")
set(CMAKE_Fortran_COMPILER "${CMAKE_GENERATOR_FC}")
+elseif("${CMAKE_GENERATOR}" MATCHES "Xcode")
+ set(CMAKE_Fortran_COMPILER_XCODE_TYPE sourcecode.fortran.f90)
else()
if(NOT CMAKE_Fortran_COMPILER)
# prefer the environment variable CC