diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 5c044db..34ad0a9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -20,14 +20,14 @@ jobs: deb http://us.archive.ubuntu.com/ubuntu/ bionic universe EOF sudo apt -y update - sudo apt -y install libncursesw5-dev g++-7 + sudo apt -y install libncursesw5-dev g++-7 libgtest-dev - name: Configure CMake shell: bash env: CC: gcc-7 CXX: g++-7 - run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTURBO_OPTIMIZE_BUILD=OFF + run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTURBO_OPTIMIZE_BUILD=OFF -DTURBO_BUILD_TESTS=ON - name: Build shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index 7afe4df..cdb2748 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,7 +182,10 @@ if (TURBO_BUILD_TESTS) DEPENDS ${TURBO}-test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) - add_custom_target(${TURBO}-run-test ALL DEPENDS ${TURBO}-test-passed) + add_custom_target(${TURBO}-test-run ALL DEPENDS ${TURBO}-test-passed) + if (NOT TURBO_USE_SYSTEM_TVISION) + add_dependencies(${TURBO}-test-run tvision-test-run) + endif() endif() # Examples diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 921bf73..0f83830 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -18,12 +18,13 @@ function(turbo_find_library name header) target_include_directories(${name} INTERFACE ${${name}_INCLUDE}) endfunction() -set(TV_OPTIMIZE_BUILD ${TURBO_OPTIMIZE_BUILD}) if (TURBO_USE_SYSTEM_TVISION) find_package(tvision CONFIG REQUIRED) add_library(tvision ALIAS tvision::tvision) get_target_property(_TVISION tvision LOCATION) message(STATUS "Found 'tvision': ${_TVISION}") else() + set(TV_OPTIMIZE_BUILD ${TURBO_OPTIMIZE_BUILD}) + set(TV_BUILD_TESTS ${TURBO_BUILD_TESTS}) add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tvision" EXCLUDE_FROM_ALL) endif()