diff --git a/urdf/CMakeLists.txt b/urdf/CMakeLists.txt index f3720c5b..a390772b 100644 --- a/urdf/CMakeLists.txt +++ b/urdf/CMakeLists.txt @@ -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}