Merge pull request #414 from vgough/noinstall

skip install for tests and other vendored subdirs
This commit is contained in:
Valient Gough 2017-10-08 16:23:26 -07:00 committed by GitHub
commit fc185b99bf
2 changed files with 6 additions and 5 deletions

View File

@ -195,7 +195,7 @@ if (USE_INTERNAL_TINYXML)
set(BUILD_STATIC_LIBS ON CACHE BOOL "build static libs") set(BUILD_STATIC_LIBS ON CACHE BOOL "build static libs")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared libs") set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared libs")
set(BUILD_TESTS OFF CACHE BOOL "build tests") 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}) include_directories(${CMAKE_CURRENT_LIST_DIR}/${TINYXML_DIR})
link_directories(${CMAKE_BINARY_DIR}/${TINYXML_DIR}) link_directories(${CMAKE_BINARY_DIR}/${TINYXML_DIR})
set(TINYXML_LIBRARIES tinyxml2_static) set(TINYXML_LIBRARIES tinyxml2_static)
@ -207,7 +207,7 @@ endif ()
message("-- Using vendored easylogging++") message("-- Using vendored easylogging++")
set(EASYLOGGING_DIR vendor/github.com/muflihun/easyloggingpp) set(EASYLOGGING_DIR vendor/github.com/muflihun/easyloggingpp)
set(build_static_lib ON CACHE BOOL "build static libs") 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) include_directories(${CMAKE_CURRENT_LIST_DIR}/${EASYLOGGING_DIR}/src)
link_directories(${CMAKE_BINARY_DIR}/${EASYLOGGING_DIR}) link_directories(${CMAKE_BINARY_DIR}/${EASYLOGGING_DIR})
set(EASYLOGGING_LIBRARIES easyloggingpp) set(EASYLOGGING_LIBRARIES easyloggingpp)
@ -325,16 +325,16 @@ if (BUILD_UNIT_TESTS)
enable_testing() enable_testing()
set(GOOGLETEST_DIR vendor/github.com/google/googletest) 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) link_directories(${CMAKE_BINARY_DIR}/${GOOGLETEST_DIR}/googletest)
set(GOOGLEBENCH_DIR vendor/github.com/google/benchmark) set(GOOGLEBENCH_DIR vendor/github.com/google/benchmark)
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "benchmark tests") 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}) link_directories(${CMAKE_BINARY_DIR}/${GOOGLEBENCH_DIR})
# Unit tests. # Unit tests.
add_subdirectory(test) add_subdirectory(test EXCLUDE_FROM_ALL)
# Integration test target - runs against built encfs. # Integration test target - runs against built encfs.
add_custom_target(integration COMMAND ${CMAKE_CURRENT_LIST_DIR}/integration.sh) add_custom_target(integration COMMAND ${CMAKE_CURRENT_LIST_DIR}/integration.sh)

View File

@ -23,6 +23,7 @@ fi
cd build cd build
${CMAKE} .. ${CFG} ${CMAKE} .. ${CFG}
make -j2 make -j2
make unittests
make test make test
if [[ "$INTEGRATION" == "true" ]]; then if [[ "$INTEGRATION" == "true" ]]; then
make integration make integration