diff options
Diffstat (limited to 'csync/CMakeLists.txt')
-rw-r--r-- | csync/CMakeLists.txt | 16 |
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) |