mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 05:20:34 +00:00
DetermineCompiler: Relax _CMAKE_TOOLCHAIN_PREFIX detection
Now detect _CMAKE_TOOLCHAIN_PREFIX whenever a compilers name matches the heuristics, instead of only doing it when cross compiling
This commit is contained in:
parent
888b8a43d8
commit
c5dd2ca538
@ -153,7 +153,7 @@ endif ()
|
|||||||
# NAME_WE cannot be used since then this test will fail for names like
|
# NAME_WE cannot be used since then this test will fail for names like
|
||||||
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
|
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
|
||||||
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
||||||
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
|
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
|
||||||
|
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|QCC")
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|QCC")
|
||||||
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
|
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
|
||||||
|
@ -150,7 +150,7 @@ endif ()
|
|||||||
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
||||||
|
|
||||||
|
|
||||||
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
|
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
|
||||||
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
|
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
|
||||||
get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
|
get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
|
||||||
|
@ -249,7 +249,7 @@ endif ()
|
|||||||
# NAME_WE cannot be used since then this test will fail for names like
|
# NAME_WE cannot be used since then this test will fail for names like
|
||||||
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
|
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
|
||||||
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
||||||
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
|
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
|
||||||
|
|
||||||
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
|
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
|
||||||
get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME)
|
get_filename_component(COMPILER_BASENAME "${CMAKE_Fortran_COMPILER}" NAME)
|
||||||
|
@ -145,7 +145,7 @@ endif ()
|
|||||||
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
||||||
|
|
||||||
|
|
||||||
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
|
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
|
||||||
|
|
||||||
if("${CMAKE_OBJCXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
|
if("${CMAKE_OBJCXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
|
||||||
get_filename_component(COMPILER_BASENAME "${CMAKE_OBJCXX_COMPILER}" NAME)
|
get_filename_component(COMPILER_BASENAME "${CMAKE_OBJCXX_COMPILER}" NAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user