aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-03-07 15:57:28 -0800
committerCopybara-Service <copybara-worker@google.com>2023-03-07 15:58:12 -0800
commita798c2f10200b6293a5cc236b5f41b26c1ae7378 (patch)
treee2d4b75862acf88cab6b05514e0e66145c2e4444 /ci
parent678c1c73de2cf004d58f5dbbef299083997d924a (diff)
downloadgoogletest-a798c2f10200b6293a5cc236b5f41b26c1ae7378.zip
googletest-a798c2f10200b6293a5cc236b5f41b26c1ae7378.tar.gz
googletest-a798c2f10200b6293a5cc236b5f41b26c1ae7378.tar.bz2
Add -Wundef to the CI scripts when building with Bazel
The CMake build already adds -Wundef for gcc/clang. This change makes sure that the gcc/clang Bazel builds also compile correctly with -Wundef (#3267). PiperOrigin-RevId: 514864451 Change-Id: I7798a4a4c68d037e23625db24ee29df454367734
Diffstat (limited to 'ci')
-rw-r--r--ci/linux-presubmit.sh3
-rw-r--r--ci/macos-presubmit.sh1
2 files changed, 4 insertions, 0 deletions
diff --git a/ci/linux-presubmit.sh b/ci/linux-presubmit.sh
index 626989d..6bac887 100644
--- a/ci/linux-presubmit.sh
+++ b/ci/linux-presubmit.sh
@@ -78,6 +78,7 @@ time docker run \
--copt="-Wall" \
--copt="-Werror" \
--copt="-Wuninitialized" \
+ --copt="-Wundef" \
--copt="-Wno-error=pragmas" \
--distdir="/bazel-distdir" \
--features=external_include_paths \
@@ -99,6 +100,7 @@ for std in ${STD}; do
--copt="-Wall" \
--copt="-Werror" \
--copt="-Wuninitialized" \
+ --copt="-Wundef" \
--define="absl=${absl}" \
--distdir="/bazel-distdir" \
--features=external_include_paths \
@@ -123,6 +125,7 @@ for std in ${STD}; do
--copt="-Wall" \
--copt="-Werror" \
--copt="-Wuninitialized" \
+ --copt="-Wundef" \
--define="absl=${absl}" \
--distdir="/bazel-distdir" \
--features=external_include_paths \
diff --git a/ci/macos-presubmit.sh b/ci/macos-presubmit.sh
index 8f35df5..681ebc2 100644
--- a/ci/macos-presubmit.sh
+++ b/ci/macos-presubmit.sh
@@ -66,6 +66,7 @@ for absl in 0 1; do
${BAZEL_BIN} test ... \
--copt="-Wall" \
--copt="-Werror" \
+ --copt="-Wundef" \
--cxxopt="-std=c++14" \
--define="absl=${absl}" \
--features=external_include_paths \