Skip to content

Commit

Permalink
Also run Turbo Vision tests when TURBO_BUILD_TESTS=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
magiblot committed Jan 24, 2024
1 parent 782df70 commit 7537d7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 7537d7e

Please sign in to comment.