Tests/FortranC: Handle empty CMAKE_OSX_SYSROOT
The compiler inside Xcode requires an explicit `-isysroot`. Replace it with the `/usr/bin/cc` wrapper.
This commit is contained in:
parent
87a9e50995
commit
1faf60cffc
@ -5,6 +5,9 @@ set(bld "@CMAKE_CURRENT_BINARY_DIR@/FortranC/Flags")
|
||||
# flags, remove them, and invoke the real compiler.
|
||||
set(ID "CC")
|
||||
set(COMMAND "@CMAKE_C_COMPILER@")
|
||||
if("x${COMMAND}" MATCHES "xctoolchain(/usr/bin/cc)$")
|
||||
set(COMMAND "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
configure_file("${src}/test_opt.sh.in" "${bld}/cc.sh" @ONLY)
|
||||
set(ID "FC")
|
||||
set(COMMAND "@CMAKE_Fortran_COMPILER@")
|
||||
|
Loading…
Reference in New Issue
Block a user