diff --git a/mongodb_log/CMakeLists.txt b/mongodb_log/CMakeLists.txt index ff065a6..0ae9623 100644 --- a/mongodb_log/CMakeLists.txt +++ b/mongodb_log/CMakeLists.txt @@ -1,24 +1,10 @@ cmake_minimum_required(VERSION 2.8.3) project(mongodb_log) -# for ROS indigo build without C++11 support -# for ROS indigo compile without c++11 support if(DEFINED ENV{ROS_DISTRO}) - if(NOT $ENV{ROS_DISTRO} STREQUAL "indigo") + if($ENV{ROS_DISTRO} STREQUAL "kinetic") add_compile_options(-std=c++11) - message(STATUS "Building with C++11 support") - else() - message(STATUS "ROS Indigo: building without C++11 support") - endif() -else() - message(STATUS "Environmental variable ROS_DISTRO not defined, checking OS version") - file(STRINGS /etc/os-release RELEASE_CODENAME - REGEX "VERSION_CODENAME=") - if(NOT ${RELEASE_CODENAME} MATCHES "trusty") - add_compile_options(-std=c++11) - message(STATUS "OS distro is not trusty: building with C++11 support") - else() - message(STATUS "Ubuntu Trusty: building without C++11 support") + message(STATUS "Building explicitly with C++11 support") endif() endif() diff --git a/mongodb_store/CMakeLists.txt b/mongodb_store/CMakeLists.txt index 2d4f454..5ac291a 100644 --- a/mongodb_store/CMakeLists.txt +++ b/mongodb_store/CMakeLists.txt @@ -1,23 +1,10 @@ cmake_minimum_required(VERSION 2.8.3) project(mongodb_store) -# for ROS indigo compile without c++11 support if(DEFINED ENV{ROS_DISTRO}) - if(NOT $ENV{ROS_DISTRO} STREQUAL "indigo") + if($ENV{ROS_DISTRO} STREQUAL "kinetic") add_compile_options(-std=c++11) - message(STATUS "Building with C++11 support") - else() - message(STATUS "ROS Indigo: building without C++11 support") - endif() -else() - message(STATUS "Environmental variable ROS_DISTRO not defined, checking OS version") - file(STRINGS /etc/os-release RELEASE_CODENAME - REGEX "VERSION_CODENAME=") - if(NOT ${RELEASE_CODENAME} MATCHES "trusty") - add_compile_options(-std=c++11) - message(STATUS "OS distro is not trusty: building with C++11 support") - else() - message(STATUS "Ubuntu Trusty: building without C++11 support") + message(STATUS "Building explicitly with C++11 support") endif() endif()