Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies for Ubuntu
run: |
sudo apt-get update
sudo apt-get install --yes help2man qtbase5-dev qttools5-dev qttools5-dev-tools libchewing3-dev lcov
sudo apt-get install --yes help2man qtbase5-dev qttools5-dev qttools5-dev-tools libchewing3-dev lcov libgtest-dev
gcc --version
g++ --version
gcov --version
Expand All @@ -37,7 +37,7 @@ jobs:
run: |
# dependencies
brew update
brew install libchewing qt@5
brew install libchewing qt@5 googletest

# Allow CMake to find qt@5 by passing down the environment variable
echo "CMAKE_PREFIX_PATH=$(brew --prefix qt@5)" >> $GITHUB_ENV
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_fla
cmake_minimum_required(VERSION 3.10.0...3.31.6)
project(chewing-editor VERSION 0.1.2 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

include(GNUInstallDirs)

Expand Down Expand Up @@ -65,7 +65,7 @@ else()
pkg_check_modules(CHEWING REQUIRED chewing>=0.4.0)
endif()

pkg_check_modules(GTEST REQUIRED gtest>=1.7.0)
pkg_check_modules(GTEST REQUIRED gtest>=1.7.0 IMPORTED_TARGET)

# Qt library
set(CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -266,7 +266,7 @@ add_executable(run-test
${run-test_src}
)
target_link_libraries(run-test
gtest
PkgConfig::GTEST

exporter
importer
Expand Down
6 changes: 3 additions & 3 deletions scripts/lcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ done
#echo "ok"

ABSPATH=$(cd "$(dirname "$0")/.."; pwd)
lcov --directory $PWD --capture --output-file coverage.info --no-checksum --compat-libtool
lcov --remove coverage.info "/usr/include/*" "$ABSPATH/gmock/*" "$ABSPATH/test/*" --output-file coverage.info
lcov --ignore-errors empty,mismatch --directory $PWD --capture --output-file coverage.info --no-checksum --compat-libtool
lcov --ignore-errors empty,mismatch --remove coverage.info "/usr/include/*" "$ABSPATH/gmock/*" "$ABSPATH/test/*" --output-file coverage.info
LANG=C genhtml --prefix $ABSPATH --output-directory coveragereport \
--title "Code Coverage" --legend --show-details coverage.info
--title "Code Coverage" --legend --ignore-errors empty,mismatch --show-details coverage.info
Loading