Skip to content

Commit 2ad12a9

Browse files
authored
Merge branch 'google:main' into main
2 parents bf56658 + d01c822 commit 2ad12a9

File tree

8 files changed

+24
-26
lines changed

8 files changed

+24
-26
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
cmake --build .
4343
DESTDIR=../out cmake --install .
4444
45-
- uses: actions/upload-artifact@v3
45+
- uses: actions/upload-artifact@v4
4646
with:
47-
name: cppdap
48-
path: out/usr/local/
47+
name: cppdap-${{ matrix.CC }}
48+
path: out/usr/local/

CMakeLists.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
cmake_minimum_required(VERSION 3.13)
15+
cmake_minimum_required(VERSION 3.22)
1616

1717
project(cppdap VERSION 1.65.0 LANGUAGES CXX C)
1818

@@ -298,21 +298,19 @@ if(CPPDAP_BUILD_TESTS)
298298
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
299299
find_package(GTest REQUIRED)
300300
else()
301-
list(APPEND DAP_TEST_LIST
302-
${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
303-
)
304-
305-
set(DAP_TEST_INCLUDE_DIR
306-
${CPPDAP_GOOGLETEST_DIR}/googlemock/include/
307-
${CPPDAP_GOOGLETEST_DIR}/googletest/
308-
${CPPDAP_GOOGLETEST_DIR}/googletest/include/
309-
)
301+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
302+
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
303+
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
304+
# googletest has -Werror=maybe-uninitialized problems.
305+
# Disable all warnings in googletest code.
306+
target_compile_options(gtest PRIVATE -w)
307+
# gmock has -Werror=deprecated-copy problems.
308+
target_compile_options(gmock PRIVATE -w)
310309
endif()
311310

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

315-
target_include_directories(cppdap-unittests PUBLIC ${DAP_TEST_INCLUDE_DIR} )
316314
set_target_properties(cppdap-unittests PROPERTIES
317315
FOLDER "Tests"
318316
)
@@ -326,7 +324,7 @@ if(CPPDAP_BUILD_TESTS)
326324
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
327325
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
328326
else()
329-
target_link_libraries(cppdap-unittests PRIVATE cppdap)
327+
target_link_libraries(cppdap-unittests PRIVATE cppdap gtest gmock)
330328
endif()
331329
endif(CPPDAP_BUILD_TESTS)
332330

kokoro/ubuntu/presubmit-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ git config --global --add safe.directory '*'
2828
git submodule update --init
2929

3030
if [ "$BUILD_SYSTEM" == "cmake" ]; then
31-
using cmake-3.17.2
32-
using gcc-9
31+
using cmake-3.31.2
32+
using gcc-13
3333

3434
mkdir build
3535
cd build

kokoro/windows/presubmit.bat

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ REM limitations under the License.
1717
SETLOCAL ENABLEDELAYEDEXPANSION
1818

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

2323
cd %SRC%
@@ -26,19 +26,18 @@ if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
2626
git submodule update --init
2727
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
2828

29-
SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
3029
SET CONFIG=Release
3130

3231
mkdir %SRC%\build
3332
cd %SRC%\build
3433
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
3534

3635
IF /I "%BUILD_SYSTEM%"=="cmake" (
37-
cmake .. -G "%BUILD_GENERATOR%" "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
36+
cmake .. -G "%BUILD_GENERATOR%" -A %BUILD_TARGET_ARCH% "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
3837
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
39-
%MSBUILD% /p:Configuration=%CONFIG% cppdap.sln
38+
cmake --build . --config %CONFIG%
4039
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
41-
Release\cppdap-unittests.exe
40+
%CONFIG%\cppdap-unittests.exe
4241
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
4342
) ELSE (
4443
echo "Unknown build system: %BUILD_SYSTEM%"

kokoro/windows/msvc-14.14-x64/cmake/presubmit.cfg renamed to kokoro/windows/vs2022-amd64/cmake/presubmit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env_vars {
1010

1111
env_vars {
1212
key: "BUILD_GENERATOR"
13-
value: "Visual Studio 15 2017 Win64"
13+
value: "Visual Studio 17 2022"
1414
}
1515

1616
env_vars {

kokoro/windows/msvc-14.14-x86/cmake/presubmit.cfg renamed to kokoro/windows/vs2022-x86/cmake/presubmit.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ env_vars {
1010

1111
env_vars {
1212
key: "BUILD_GENERATOR"
13-
value: "Visual Studio 15 2017"
13+
value: "Visual Studio 17 2022"
1414
}
1515

1616
env_vars {
1717
key: "BUILD_TARGET_ARCH"
18-
value: "x86"
18+
value: "Win32"
1919
}

license-checker.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"exclude": [
99
".clang-format",
1010
".gitattributes",
11+
".github/workflows/main.yml",
1112
".gitignore",
1213
".gitmodules",
1314
".vscode/*.json",

third_party/googletest

Submodule googletest updated 291 files

0 commit comments

Comments
 (0)