Skip to content

Commit

Permalink
Merge branch 'feature/grid_map_static_analysis' into 'master'
Browse files Browse the repository at this point in the history
[grid_map] Enabled static analysis without code formatting on all packages

GitOrigin-RevId: 78cf1b49f972725e9adc4faebb6f236f4255143e
  • Loading branch information
YoshuaNavaANYbotics authored and anybotics-sync-runner committed Nov 18, 2020
1 parent 8d0a3b4 commit ea0759a
Show file tree
Hide file tree
Showing 23 changed files with 154 additions and 13 deletions.
14 changes: 13 additions & 1 deletion grid_map_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_core)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED)

Expand Down Expand Up @@ -146,4 +148,14 @@ if(CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_core/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>eigen</depend>
<!-- <test_depend>cmake_code_coverage</test_depend> -->
<test_depend>gtest</test_depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_costmap_2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_costmap_2d)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED
COMPONENTS
Expand Down Expand Up @@ -91,4 +93,14 @@ if(CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_costmap_2d/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>grid_map_core</depend>
<depend>costmap_2d</depend>
<depend>tf</depend>
Expand Down
11 changes: 11 additions & 0 deletions grid_map_cv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_cv)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
grid_map_core
Expand Down Expand Up @@ -125,3 +127,12 @@ if(CATKIN_ENABLE_TESTING)
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_cv/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<author email="[email protected]">Péter Fankhauser</author>
<author email="[email protected]">Magnus Gärtner</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>grid_map_core</depend>
<depend>cv_bridge</depend>
<depend>filters</depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_demos)

set(CMAKE_CXX_STANDARD 11)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down Expand Up @@ -265,4 +267,14 @@ if(CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>roscpp</depend>
<depend>grid_map_core</depend>
<depend>grid_map_ros</depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set(CMAKE_CXX_STANDARD 11)
# Therefore, we disable the finite-math-only flag that was set by fast-math.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -fno-finite-math-only")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

find_package(Boost REQUIRED)

# Other possible options.
Expand Down Expand Up @@ -160,4 +162,14 @@ if (CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_filters/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<author email="[email protected]">Péter Fankhauser</author>
<author email="[email protected]">Martin Wermelinger</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>boost</depend>
<depend>filters</depend>
<depend>grid_map_core</depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_loader)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down Expand Up @@ -95,4 +97,14 @@ if (CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_loader/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>roscpp</depend>
<depend>grid_map_ros</depend>
<depend>grid_map_msgs</depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_octomap)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED
COMPONENTS
Expand Down Expand Up @@ -121,4 +123,14 @@ if(CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_octomap/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<author email="[email protected]">Jeff Delmerico</author>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>grid_map_core</depend>
<depend>octomap</depend>
<!-- <test_depend>cmake_code_coverage</test_depend> -->
Expand Down
8 changes: 4 additions & 4 deletions grid_map_pcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(grid_map_pcl)

set(CMAKE_CXX_STANDARD 14)
add_compile_options(-Wall -Wextra -Wpedantic)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(SRC_FILES
Expand Down Expand Up @@ -195,10 +196,9 @@ if(CATKIN_ENABLE_TESTING)
endif()
endif()

###########
## Clang ##
###########

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling()
Expand Down
11 changes: 11 additions & 0 deletions grid_map_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_ros)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down Expand Up @@ -133,3 +135,12 @@ if(CATKIN_ENABLE_TESTING)
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>roscpp</depend>
<depend>grid_map_core</depend>
<depend>grid_map_msgs</depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_rviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_rviz_plugin)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

find_package(catkin REQUIRED
COMPONENTS
rviz
Expand Down Expand Up @@ -145,4 +147,14 @@ if (CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_rviz_plugin/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<author>Péter Fankhauser</author>

<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<build_depend>qtbase5-dev</build_depend>
<build_depend>rviz</build_depend>
<build_depend>grid_map_ros</build_depend>
Expand Down
14 changes: 13 additions & 1 deletion grid_map_sdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_sdf)

set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
grid_map_core
Expand Down Expand Up @@ -102,4 +104,14 @@ if(CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_sdf/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<author email="[email protected]">Takahiro Miki</author>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>grid_map_core</depend>
<depend>pcl_ros</depend>
<!-- <test_depend>cmake_code_coverage</test_depend> -->
Expand Down
14 changes: 13 additions & 1 deletion grid_map_visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(grid_map_visualization)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
Expand Down Expand Up @@ -133,4 +135,14 @@ if (CATKIN_ENABLE_TESTING)
${PROJECT_NAME}-test
)
endif()
endif()
endif()

#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)
1 change: 1 addition & 0 deletions grid_map_visualization/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<url type="bugtracker">http://github.com/anybotics/grid_map/issues</url>
<author email="[email protected]">Péter Fankhauser</author>
<buildtool_depend>catkin</buildtool_depend>
<!-- <build_depend>cmake_clang_tools</build_depend> -->
<depend>roscpp</depend>
<depend>grid_map_core</depend>
<depend>grid_map_ros</depend>
Expand Down

0 comments on commit ea0759a

Please sign in to comment.