diff --git a/nav2_common/cmake/nav2_package.cmake b/nav2_common/cmake/nav2_package.cmake
index 9539a5195d11c2a0a77dfbd23fb8e522ef9a8072..61dd187cfeb65e2368ed72c4b25ad9bb6d53b52f 100644
--- a/nav2_common/cmake/nav2_package.cmake
+++ b/nav2_common/cmake/nav2_package.cmake
@@ -33,7 +33,7 @@ macro(nav2_package)
   endif()
 
   if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-deprecated-declarations -fPIC)
+    add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wdeprecated -fPIC)
   endif()
 
   option(COVERAGE_ENABLED "Enable code coverage" FALSE)