BuildSystem: Try to set compiler only if it exists
This commit is contained in:
parent
7ce8e2d57b
commit
2eef581737
|
@ -8,16 +8,14 @@ endif()
|
|||
|
||||
set(TOOLCHAIN_PREFIX ${CMAKE_SOURCE_DIR}/toolchain/local)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-g++)
|
||||
set(CMAKE_CXX_COMPILER_WORKS True)
|
||||
if(EXISTS ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-g++)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-g++)
|
||||
set(CMAKE_CXX_COMPILER_WORKS True)
|
||||
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-gcc)
|
||||
set(CMAKE_C_COMPILER_WORKS True)
|
||||
|
||||
if(NOT EXISTS ${CMAKE_CXX_COMPILER})
|
||||
set(CMAKE_CXX_COMPILER g++)
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-gcc)
|
||||
set(CMAKE_C_COMPILER_WORKS True)
|
||||
endif()
|
||||
|
||||
if(DEFINED QEMU_ACCEL)
|
||||
|
|
Loading…
Reference in New Issue