Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions mongodb_log/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()

Expand Down
17 changes: 2 additions & 15 deletions mongodb_store/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()

Expand Down