Commit fe9fcf6
committed
cmake: Fix googletest deprecated warnings by using target_compile_options()
Previously, we attempted to disable deprecated declarations warnings when
building gtest by adding `-Wno-deprecated-declarations` to the COMPILE_OPTIONS
property of the googletest directory. However, this approach failed to apply
the option when actually building gtest.
This change applies the compile option directly to the `gtest` target using
target_compile_options() instead. Verified by forcing the condition to TRUE
and confirming the option is included when building `gtest-all.cc` through
`cmake --build ~/dev/ceph/build --target gtest --verbose`.
Signed-off-by: Kefu Chai <[email protected]>1 parent 7a4d7c5 commit fe9fcf6
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
781 | | - | |
782 | | - | |
| 780 | + | |
| 781 | + | |
783 | 782 | | |
784 | 783 | | |
785 | 784 | | |
| |||
0 commit comments