From 34b31c01461dfb4f5a12b6938394823a653e9600 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 5 Jun 2014 14:22:10 +0200 Subject: [PATCH] CSync: Fix test compile The previously applied pull request apparantly broke the compile because it re-ordered entries in the CMakeLists --- csync/CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/csync/CMakeLists.txt b/csync/CMakeLists.txt index a80504449..757725786 100644 --- a/csync/CMakeLists.txt +++ b/csync/CMakeLists.txt @@ -28,14 +28,6 @@ if (NOT WIN32) find_package(Iconv) endif (NOT WIN32) -if (UNIT_TESTING) - find_package(CMocka) - if (CMOCKA_FOUND) - include(AddCMockaTest) - add_subdirectory(tests) - endif (CMOCKA_FOUND) -endif (UNIT_TESTING) - include(ConfigureChecks.cmake) @@ -51,6 +43,14 @@ endif (MEM_NULL_TESTS) add_subdirectory(src) +if (UNIT_TESTING) + find_package(CMocka) + if (CMOCKA_FOUND) + include(AddCMockaTest) + add_subdirectory(tests) + endif (CMOCKA_FOUND) +endif (UNIT_TESTING) + configure_file(config_csync.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_csync.h) configure_file(config_test.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_test.h)