kokoro: update tooling, fix warnings
Kokoro changes: - Linux: gcc-13, cmake-3.31.2 - Windows: python 3.12, cmake-3.31.2 * Disable warnings in gtest, gmock This is required in order to build with GCC 13, and Apple Clang with warnings-as-errors Bug: crbug.com/383538610 * disable license check on .github/workflows/main.yml * Use add_subdirectory for internal gtest, gmock --------- Co-authored-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
c69444ed76
commit
9fd09d6dce
@ -298,21 +298,19 @@ if(CPPDAP_BUILD_TESTS)
|
|||||||
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
||||||
find_package(GTest REQUIRED)
|
find_package(GTest REQUIRED)
|
||||||
else()
|
else()
|
||||||
list(APPEND DAP_TEST_LIST
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
|
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||||
)
|
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
|
||||||
|
# googletest has -Werror=maybe-uninitialized problems.
|
||||||
set(DAP_TEST_INCLUDE_DIR
|
# Disable all warnings in googletest code.
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googlemock/include/
|
target_compile_options(gtest PRIVATE -w)
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googletest/
|
# gmock has -Werror=deprecated-copy problems.
|
||||||
${CPPDAP_GOOGLETEST_DIR}/googletest/include/
|
target_compile_options(gmock PRIVATE -w)
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(cppdap-unittests ${DAP_TEST_LIST})
|
add_executable(cppdap-unittests ${DAP_TEST_LIST})
|
||||||
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)
|
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)
|
||||||
|
|
||||||
target_include_directories(cppdap-unittests PUBLIC ${DAP_TEST_INCLUDE_DIR} )
|
|
||||||
set_target_properties(cppdap-unittests PROPERTIES
|
set_target_properties(cppdap-unittests PROPERTIES
|
||||||
FOLDER "Tests"
|
FOLDER "Tests"
|
||||||
)
|
)
|
||||||
@ -326,7 +324,7 @@ if(CPPDAP_BUILD_TESTS)
|
|||||||
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
||||||
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
|
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(cppdap-unittests PRIVATE cppdap)
|
target_link_libraries(cppdap-unittests PRIVATE cppdap gtest gmock)
|
||||||
endif()
|
endif()
|
||||||
endif(CPPDAP_BUILD_TESTS)
|
endif(CPPDAP_BUILD_TESTS)
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ git config --global --add safe.directory '*'
|
|||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
|
||||||
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
||||||
using cmake-3.17.2
|
using cmake-3.31.2
|
||||||
using gcc-9
|
using gcc-13
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
@ -17,7 +17,7 @@ REM limitations under the License.
|
|||||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
SET BUILD_ROOT=%cd%
|
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
|
SET SRC=%cd%\github\cppdap
|
||||||
|
|
||||||
cd %SRC%
|
cd %SRC%
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"exclude": [
|
"exclude": [
|
||||||
".clang-format",
|
".clang-format",
|
||||||
".gitattributes",
|
".gitattributes",
|
||||||
|
".github/workflows/main.yml",
|
||||||
".gitignore",
|
".gitignore",
|
||||||
".gitmodules",
|
".gitmodules",
|
||||||
".vscode/*.json",
|
".vscode/*.json",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user