From 682caa865d4a064b7fa1b46b02c6ffef1f3a7597 Mon Sep 17 00:00:00 2001 From: ljfa Date: Tue, 22 Sep 2015 15:57:20 +0200 Subject: Only search CxxTest when NBT_BUILD_TESTS is on --- CMakeLists.txt | 3 +-- test/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ebd2d0c6c..ad05cb74a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,10 +31,9 @@ target_link_libraries(nbt++ z) generate_export_header(nbt++ BASE_NAME nbt) find_package(ZLIB REQUIRED) -find_package(CxxTest) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) -option(NBT_BUILD_TESTS "Build the unit tests. Requires CxxTest." ${CXXTEST_FOUND}) +option(NBT_BUILD_TESTS "Build the unit tests. Requires CxxTest." ON) if(NBT_BUILD_TESTS) enable_testing() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 418f6b4b14..04a461a07a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,6 @@ enable_testing() +find_package(CxxTest REQUIRED) + include_directories(${libnbt++_SOURCE_DIR}/include) include_directories(${CXXTEST_INCLUDE_DIR}) -- cgit 0.0.5-2-1-g0f52