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
20 changes: 9 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,21 +298,19 @@ if(CPPDAP_BUILD_TESTS)
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
find_package(GTest REQUIRED)
else()
list(APPEND DAP_TEST_LIST
${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
)

set(DAP_TEST_INCLUDE_DIR
${CPPDAP_GOOGLETEST_DIR}/googlemock/include/
${CPPDAP_GOOGLETEST_DIR}/googletest/
${CPPDAP_GOOGLETEST_DIR}/googletest/include/
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
# googletest has -Werror=maybe-uninitialized problems.
# Disable all warnings in googletest code.
target_compile_options(gtest PRIVATE -w)
# gmock has -Werror=deprecated-copy problems.
target_compile_options(gmock PRIVATE -w)
endif()

add_executable(cppdap-unittests ${DAP_TEST_LIST})
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)

target_include_directories(cppdap-unittests PUBLIC ${DAP_TEST_INCLUDE_DIR} )
set_target_properties(cppdap-unittests PROPERTIES
FOLDER "Tests"
)
Expand All @@ -326,7 +324,7 @@ if(CPPDAP_BUILD_TESTS)
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
else()
target_link_libraries(cppdap-unittests PRIVATE cppdap)
target_link_libraries(cppdap-unittests PRIVATE cppdap gtest gmock)
endif()
endif(CPPDAP_BUILD_TESTS)

Expand Down
4 changes: 2 additions & 2 deletions kokoro/ubuntu/presubmit-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ git config --global --add safe.directory '*'
git submodule update --init

if [ "$BUILD_SYSTEM" == "cmake" ]; then
using cmake-3.17.2
using gcc-9
using cmake-3.31.2
using gcc-13

mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion kokoro/windows/presubmit.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ REM limitations under the License.
SETLOCAL ENABLEDELAYEDEXPANSION

SET BUILD_ROOT=%cd%
SET PATH=C:\python36;C:\Program Files\cmake-3.23.1-windows-x86_64\bin;%PATH%
SET PATH=C:\python312;C:\cmake-3.31.2\bin;%PATH%
SET SRC=%cd%\github\cppdap

cd %SRC%
Expand Down
1 change: 1 addition & 0 deletions license-checker.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"exclude": [
".clang-format",
".gitattributes",
".github/workflows/main.yml",
".gitignore",
".gitmodules",
".vscode/*.json",
Expand Down
Loading