From ef6d920a8ef3b312b9e17a2932182bea1cecb561 Mon Sep 17 00:00:00 2001 From: "G.A. vd. Hoorn" Date: Tue, 6 Nov 2018 14:53:20 +0100 Subject: [PATCH] Select CMake build type if not configured. (#225) The refactored version of this driver benefits from optimalisations so selecting a build type with optimalisations enabled is important. Only if the user hasn't configured a build type do we do this to prevent overriding whatever was already configured. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7d0842..27daafe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,11 @@ project(ur_modern_driver) add_definitions( -DROS_BUILD ) +if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + message("${PROJECT_NAME}: You did not request a specific build type: selecting 'RelWithDebInfo'.") + set(CMAKE_BUILD_TYPE RelWithDebInfo) +endif() + find_package(catkin REQUIRED COMPONENTS actionlib