Skip to content
Snippets Groups Projects
Commit 3065d2ac authored by Jeremie Deray's avatar Jeremie Deray
Browse files

strengthen gcc compilation flags

parent b2154ea1
No related branches found
No related tags found
1 merge request!91catkin build
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
...@@ -40,6 +40,12 @@ message(STATUS "Configured to compile in ${CMAKE_BUILD_TYPE} mode.") ...@@ -40,6 +40,12 @@ message(STATUS "Configured to compile in ${CMAKE_BUILD_TYPE} mode.")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -D_REENTRANT") SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -D_REENTRANT")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -D_REENTRANT") SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -D_REENTRANT")
if(UNIX)
# GCC is not strict enough by default, so enable most of the warnings.
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Werror=all -Werror=extra -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers")
endif(UNIX)
#Set compiler according C++11 support #Set compiler according C++11 support
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment