Skip to content

Commit

Permalink
Select CMake build type if not configured. (ros-industrial#225)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gavanderhoorn authored and miguelprada committed Nov 6, 2018
1 parent 1b19728 commit ef6d920
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef6d920

Please sign in to comment.