From 41cb1b5cfb1d1a1da15cbd922c825d2ba3a47005 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Fri, 17 Dec 2021 17:07:22 +0000 Subject: [PATCH] CMake: Do not build tests when cross-compiling We may want to in the future but for now disable this. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d785ffc6..7ad5d7a1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,6 +127,11 @@ include(CTest) # to be after the options. include(Platforms) +# Note: `CMAKE_CROSSCOMPILING` is only available after the `project` call. +if(CMAKE_CROSSCOMPILING) + set(BUILD_TESTING OFF) +endif() + # Recalculate the dependent options after including the Platforms: if(BUILD_TESTING) # For tests, we build a libdevilutionx.so shared library.