From e32e2c0eb573bd8321ddf6288c9e9f9744232186 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 28 Apr 2020 21:52:47 +0200 Subject: [PATCH] cmake: Fix setting default value for DBUS_BUILD_TESTS too late This prevented setting cross compile support required for !158. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec199df0..047cab87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,8 @@ if(CMAKE_MAJOR_VERSION GREATER 2) endif() endif() +option(DBUS_BUILD_TESTS "enable unit test code" ON) + # detect version include(MacrosAutotools) autoinit(configure.ac) @@ -300,8 +302,6 @@ set(DBUS_INCLUDES) enable_testing() ########### command line options ############### -option(DBUS_BUILD_TESTS "enable unit test code" ON) - if(DBUS_BUILD_TESTS) set(DBUS_ENABLE_EMBEDDED_TESTS ON) set(DBUS_ENABLE_MODULAR_TESTS ON)