mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-04 04:03:22 +03:00
Apple: Restore detection of platform-specific GNU Fortran flags
Detection of `-isysroot` was broken by commit a1b5c0da87 (Modules:
Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL, 2026-05-05,
v4.4.0-rc1~209^2~1) because `gfortran -v --help` returns non-zero.
Fixes: #28111
This commit is contained in:
1 parent
76395764c7
commit
cc6bcefc6a
1 file changed
+4
-4
@@ -31,9 +31,9 @@ macro(cmake_gnu_set_sysroot_flag lang)
|
||||
COMMAND ${CMAKE_${lang}_COMPILER} "-v" "--help"
|
||||
OUTPUT_VARIABLE _gcc_help
|
||||
ERROR_VARIABLE _gcc_help
|
||||
RESULT_VARIABLE _gcc_result
|
||||
RESULT_VARIABLE _gcc_result # may be non-zero
|
||||
)
|
||||
if(_gcc_result EQUAL 0 AND "${_gcc_help}" MATCHES "isysroot")
|
||||
if("${_gcc_help}" MATCHES "isysroot")
|
||||
message(CHECK_PASS "yes")
|
||||
set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
|
||||
else()
|
||||
@@ -52,9 +52,9 @@ macro(cmake_gnu_set_osx_deployment_target_flag lang)
|
||||
COMMAND ${CMAKE_${lang}_COMPILER} "-v" "--help"
|
||||
OUTPUT_VARIABLE _gcc_help
|
||||
ERROR_VARIABLE _gcc_help
|
||||
RESULT_VARIABLE _gcc_result
|
||||
RESULT_VARIABLE _gcc_result # may be non-zero
|
||||
)
|
||||
if(_gcc_result EQUAL 0 AND "${_gcc_help}" MATCHES "macosx-version-min")
|
||||
if("${_gcc_help}" MATCHES "macosx-version-min")
|
||||
message(CHECK_PASS "yes")
|
||||
set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
|
||||
else()
|
||||
|
||||
Reference in new issue
Block a user