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