Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuba Serafinowski <zizzfizzix@gmail.com>2014-06-02 19:36:42 +0400
committerKuba Serafinowski <zizzfizzix@gmail.com>2014-06-04 01:10:16 +0400
commit62ea6f316f334b3d0f77e26f87398f75e054115c (patch)
tree7f5d4a9419657f616db0bf251fe255d33a5785d2 /csync/CMakeLists.txt
parenta50e7c1b48206e42916162802d8df9789813cfe8 (diff)
don't look for CMocka if we're not building unit tests
Diffstat (limited to 'csync/CMakeLists.txt')
-rw-r--r--csync/CMakeLists.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/csync/CMakeLists.txt b/csync/CMakeLists.txt
index 86b0d98c7..a80504449 100644
--- a/csync/CMakeLists.txt
+++ b/csync/CMakeLists.txt
@@ -27,10 +27,14 @@ include(MacroCopyFile)
if (NOT WIN32)
find_package(Iconv)
endif (NOT WIN32)
-find_package(CMocka)
-if (CMOCKA_FOUND AND UNIT_TESTING)
- include(AddCMockaTest)
-endif (CMOCKA_FOUND AND UNIT_TESTING)
+
+if (UNIT_TESTING)
+ find_package(CMocka)
+ if (CMOCKA_FOUND)
+ include(AddCMockaTest)
+ add_subdirectory(tests)
+ endif (CMOCKA_FOUND)
+endif (UNIT_TESTING)
include(ConfigureChecks.cmake)
@@ -47,10 +51,6 @@ endif (MEM_NULL_TESTS)
add_subdirectory(src)
-if (CMOCKA_FOUND AND UNIT_TESTING)
- add_subdirectory(tests)
-endif (CMOCKA_FOUND AND 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)