Skip to content

Commit c5b019a

Browse files
committed
[cmake] Ignore all warnings from gtest code
1 parent 3735cef commit c5b019a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ add_library(
1414
gtest/src/gtest-all.cc
1515
)
1616

17+
# Ignore all warnings from gtest code.
18+
target_compile_options(
19+
gtest
20+
PRIVATE
21+
$<$<CXX_COMPILER_ID:Clang>:-w>
22+
$<$<CXX_COMPILER_ID:GNU>:-w>
23+
$<$<CXX_COMPILER_ID:MSVC>:/W0>
24+
)
25+
1726
add_executable(
1827
${testName}
1928

0 commit comments

Comments
 (0)