Skip to content

Commit

Permalink
only add c++11 flag when it's supported
Browse files Browse the repository at this point in the history
  • Loading branch information
kejxu committed Feb 15, 2019
1 parent 4707296 commit 00f9b38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion urdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ set(generated_compat_header "${CATKIN_DEVEL_PREFIX}/include/${PROJECT_NAME}/urdf
include_directories("${CATKIN_DEVEL_PREFIX}/include")
configure_file(urdfdom_compatibility.h.in "${generated_compat_header}" @ONLY)

add_compile_options(-std=c++11)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
add_compile_options(-std=c++11)
endif()

catkin_package(
LIBRARIES ${PROJECT_NAME}
Expand Down

0 comments on commit 00f9b38

Please sign in to comment.