From 08affc5e9b52ee2ac9ec082057f367f7a25fd829 Mon Sep 17 00:00:00 2001 From: v4hn Date: Wed, 11 Oct 2017 20:34:19 +0200 Subject: [PATCH 1/3] set(CMAKE_CXX_FLAGS -> add_compile_options Some of the set commands overwrote user-provided values. Also add_compile_options is the much cleaner interface to add the values --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be227ba..c510ce5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 2.8.12) project(ur_modern_driver) @@ -127,14 +127,16 @@ include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) if(COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "-std=c++11") + add_compile_options(-std=c++11) elseif(COMPILER_SUPPORTS_CXX0X) - set(CMAKE_CXX_FLAGS "-std=c++0x") + add_compile_options(-std=c++0x) else() message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler. Suggested solution: update the pkg build-essential ") endif() -set(CMAKE_CXX_FLAGS "-g -Wall -Wextra -Wno-unused-parameter ${CMAKE_CXX_FLAGS}") +add_compile_options(-Wall) +add_compile_options(-Wextra) +add_compile_options(-Wno-unused-parameter) ## Specify additional locations of header files ## Your package locations should be listed before other locations From 3bd3c017a5ead4fe8baa8894da41aa9e3b154c27 Mon Sep 17 00:00:00 2001 From: v4hn Date: Wed, 11 Oct 2017 20:36:06 +0200 Subject: [PATCH 2/3] cleanup inconsistent / unused dependencies --- CMakeLists.txt | 2 +- package.xml | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c510ce5..3275e59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ find_package(catkin REQUIRED COMPONENTS geometry_msgs roscpp sensor_msgs - std_msgs + std_srvs trajectory_msgs ur_msgs tf diff --git a/package.xml b/package.xml index f1cd996..e451bc3 100644 --- a/package.xml +++ b/package.xml @@ -47,11 +47,9 @@ geometry_msgs roscpp sensor_msgs - std_msgs trajectory_msgs ur_msgs tf - realtime_tools std_srvs hardware_interface controller_manager @@ -61,14 +59,13 @@ geometry_msgs roscpp sensor_msgs - std_msgs trajectory_msgs ur_msgs ur_description tf - realtime_tools std_srvs + rosunit From 025739648685edb3d1e41f905f3a4c00d871c2d2 Mon Sep 17 00:00:00 2001 From: v4hn Date: Wed, 11 Oct 2017 20:36:33 +0200 Subject: [PATCH 3/3] fix typo in catkin_package ur_hardware_interface is no *dependency* of this package. It's a library *provided* by this package --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3275e59..6e27394 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,9 +113,8 @@ find_package(catkin REQUIRED COMPONENTS ## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( INCLUDE_DIRS include -# LIBRARIES ur_modern_driver + LIBRARIES ur_hardware_interface CATKIN_DEPENDS hardware_interface controller_manager actionlib control_msgs geometry_msgs roscpp sensor_msgs trajectory_msgs ur_msgs - DEPENDS ur_hardware_interface ) ###########