Skip to content

Commit

Permalink
[C++14] remove explicit -std=c++11 and checks
Browse files Browse the repository at this point in the history
From REP-0003

> Melodic
> As of ROS Melodic, we are using the C++14 (ISO/IEC 14882:2014) standard.

Related to discussion on: moveit/moveit#1146
Similar to: ros/class_loader#87
  • Loading branch information
moriarty committed Oct 26, 2018
1 parent 54c925e commit 60a0b9f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pluginlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(${PROJECT_NAME}_utest test_plugins)
endif()

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
catkin_add_gtest(${PROJECT_NAME}_unique_ptr_test test/unique_ptr_test.cpp)
if(TARGET ${PROJECT_NAME}_unique_ptr_test)
target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
set_target_properties(${PROJECT_NAME}_unique_ptr_test PROPERTIES COMPILE_FLAGS -std=c++11 LINK_FLAGS -std=c++11)
add_dependencies(${PROJECT_NAME}_unique_ptr_test test_plugins)
endif()
catkin_add_gtest(${PROJECT_NAME}_unique_ptr_test test/unique_ptr_test.cpp)
if(TARGET ${PROJECT_NAME}_unique_ptr_test)
target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(${PROJECT_NAME}_unique_ptr_test test_plugins)
endif()

endif()
Expand Down

0 comments on commit 60a0b9f

Please sign in to comment.