From e6cd4719312886af2f546123ddc808e25e93bce6 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Sun, 8 Oct 2017 16:07:53 -0700 Subject: [PATCH] skip install for tests and other vendored subdirs --- CMakeLists.txt | 10 +++++----- build.sh | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 983efba..12aee01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,7 +195,7 @@ if (USE_INTERNAL_TINYXML) set(BUILD_STATIC_LIBS ON CACHE BOOL "build static libs") set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared libs") set(BUILD_TESTS OFF CACHE BOOL "build tests") - add_subdirectory(${TINYXML_DIR}) + add_subdirectory(${TINYXML_DIR} EXCLUDE_FROM_ALL) include_directories(${CMAKE_CURRENT_LIST_DIR}/${TINYXML_DIR}) link_directories(${CMAKE_BINARY_DIR}/${TINYXML_DIR}) set(TINYXML_LIBRARIES tinyxml2_static) @@ -207,7 +207,7 @@ endif () message("-- Using vendored easylogging++") set(EASYLOGGING_DIR vendor/github.com/muflihun/easyloggingpp) set(build_static_lib ON CACHE BOOL "build static libs") -add_subdirectory(${EASYLOGGING_DIR}) +add_subdirectory(${EASYLOGGING_DIR} EXCLUDE_FROM_ALL) include_directories(${CMAKE_CURRENT_LIST_DIR}/${EASYLOGGING_DIR}/src) link_directories(${CMAKE_BINARY_DIR}/${EASYLOGGING_DIR}) set(EASYLOGGING_LIBRARIES easyloggingpp) @@ -325,16 +325,16 @@ if (BUILD_UNIT_TESTS) enable_testing() set(GOOGLETEST_DIR vendor/github.com/google/googletest) - add_subdirectory(${GOOGLETEST_DIR}) + add_subdirectory(${GOOGLETEST_DIR} EXCLUDE_FROM_ALL) link_directories(${CMAKE_BINARY_DIR}/${GOOGLETEST_DIR}/googletest) set(GOOGLEBENCH_DIR vendor/github.com/google/benchmark) set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "benchmark tests") - add_subdirectory(${GOOGLEBENCH_DIR}) + add_subdirectory(${GOOGLEBENCH_DIR} EXCLUDE_FROM_ALL) link_directories(${CMAKE_BINARY_DIR}/${GOOGLEBENCH_DIR}) # Unit tests. - add_subdirectory(test) + add_subdirectory(test EXCLUDE_FROM_ALL) # Integration test target - runs against built encfs. add_custom_target(integration COMMAND ${CMAKE_CURRENT_LIST_DIR}/integration.sh) diff --git a/build.sh b/build.sh index 1379f28..b10107c 100755 --- a/build.sh +++ b/build.sh @@ -23,6 +23,7 @@ fi cd build ${CMAKE} .. ${CFG} make -j2 +make unittests make test if [[ "$INTEGRATION" == "true" ]]; then make integration