diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-11-25 16:08:57 -0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-11-27 14:46:13 +0100 |
commit | f98878e4c17d5f11e78994b4fc456e6b60b2660f (patch) | |
tree | 5ab2199e289ba0249e380da4a9a1646ca898ac9c /include/cmake.mk | |
parent | 796d51834c5be85771d26e433fd509cd3bef72e3 (diff) | |
download | upstream-f98878e4c17d5f11e78994b4fc456e6b60b2660f.tar.gz upstream-f98878e4c17d5f11e78994b4fc456e6b60b2660f.tar.bz2 upstream-f98878e4c17d5f11e78994b4fc456e6b60b2660f.zip |
cmake.mk: set C/CXX compiler for host builds as well
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>
Diffstat (limited to 'include/cmake.mk')
-rw-r--r-- | include/cmake.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cmake.mk b/include/cmake.mk index fec6da22ef..2cc10301aa 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -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)" \ |