Codebase list ros-geometry / 0d7081c
update how c++11 requirement is added (#184) * add c++11 only when it's supported * skip c++11 check for msvc James Xu authored 5 years ago Tully Foote committed 5 years ago
1 changed file(s) with 11 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
00 cmake_minimum_required(VERSION 2.8)
11 project(tf)
22
3 add_compile_options(-std=c++11)
3 include(CheckCXXCompilerFlag)
4 unset(COMPILER_SUPPORTS_CXX11 CACHE)
5 if(MSVC)
6 # https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version
7 # MSVC has c++14 enabled by default, no need to specify c++11
8 else()
9 check_cxx_compiler_flag(-std=c++11 COMPILER_SUPPORTS_CXX11)
10 if(COMPILER_SUPPORTS_CXX11)
11 add_compile_options(-std=c++11)
12 endif()
13 endif()
414
515 find_package(catkin REQUIRED COMPONENTS
616 angles