From: Ralf Habacker Date: Tue, 28 Apr 2020 19:52:47 +0000 (+0200) Subject: cmake: Fix setting default value for DBUS_BUILD_TESTS too late X-Git-Tag: dbus-1.13.16~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e32e2c0eb573bd8321ddf6288c9e9f9744232186;p=thirdparty%2Fdbus.git cmake: Fix setting default value for DBUS_BUILD_TESTS too late This prevented setting cross compile support required for !158. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ec199df03..047cab877 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)