cmake.mk: set C/CXX compiler for host builds as well
authorRosen Penev <rosenp@gmail.com>
Thu, 26 Nov 2020 00:08:57 +0000 (16:08 -0800)
committerPetr Štetiar <ynezz@true.cz>
Fri, 27 Nov 2020 13:46:13 +0000 (14:46 +0100)
Without this, cmake will use whatever CC/CXX is set to, which could be
clang. In that case, at least libjson-c/host will fail to compile.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
include/cmake.mk

index fec6da22ef264a0048f737024565d4fb0de2678a..2cc10301aa4e009356310452e8f521c472330f4f 100644 (file)
@@ -97,6 +97,8 @@ define Host/Configure/Default
                LDFLAGS="$(HOST_LDFLAGS)" \
                cmake \
                        -DCMAKE_BUILD_TYPE=Release \
+                       -DCMAKE_C_COMPILER="$(HOSTCC)" \
+                       -DCMAKE_CXX_COMPILER="$(HOSTCXX)" \
                        -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
                        -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
                        -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \