Handle a cross compilation setup that only has a C compiler.

This commit is contained in:
Jussi Pakkanen 2023-02-26 17:13:47 +02:00
parent bc38db035e
commit 2aa4d6e54e
1 changed files with 4 additions and 1 deletions

View File

@ -145,7 +145,10 @@ def deb_detect_cmake(infos: MachineInfo, data: T.Dict[str, str]) -> None:
system_processor_map = {'arm': 'armv7l', 'mips64el': 'mips64', 'powerpc64le': 'ppc64le'} system_processor_map = {'arm': 'armv7l', 'mips64el': 'mips64', 'powerpc64le': 'ppc64le'}
infos.cmake["CMAKE_C_COMPILER"] = infos.compilers['c'] infos.cmake["CMAKE_C_COMPILER"] = infos.compilers['c']
infos.cmake["CMAKE_CXX_COMPILER"] = infos.compilers['cpp'] try:
infos.cmake["CMAKE_CXX_COMPILER"] = infos.compilers['cpp']
except KeyError:
pass
infos.cmake["CMAKE_SYSTEM_NAME"] = system_name_map[data['DEB_HOST_ARCH_OS']] infos.cmake["CMAKE_SYSTEM_NAME"] = system_name_map[data['DEB_HOST_ARCH_OS']]
infos.cmake["CMAKE_SYSTEM_PROCESSOR"] = system_processor_map.get(data['DEB_HOST_GNU_CPU'], infos.cmake["CMAKE_SYSTEM_PROCESSOR"] = system_processor_map.get(data['DEB_HOST_GNU_CPU'],
data['DEB_HOST_GNU_CPU']) data['DEB_HOST_GNU_CPU'])