Use -Wpedantic (#306)

* add /W4 flag for windows

* use uint8 like defined in messages: fix warning C4244

* fix sign size_t comparison

* add only pedantic, not W4, deal with windows another day

* another sign compare warning
This commit is contained in:
Mikael Arguedas 2017-02-27 21:07:57 -08:00 committed by GitHub
parent ce146cfdba
commit 71f5b7fe5b
10 changed files with 45 additions and 43 deletions

View file

@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 3.5)
project(rclcpp_lifecycle)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
add_compile_options(-Wall -Wextra -Wpedantic)
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Wpedantic")
endif()
find_package(ament_cmake REQUIRED)