Skip to content

Commit

Permalink
don't look for CMocka if we're not building unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuba Serafinowski committed Jun 3, 2014
1 parent a50e7c1 commit 62ea6f3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions csync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 62ea6f3

Please sign in to comment.