Skip to content
Snippets Groups Projects
Commit 3c581d7f authored by Palana's avatar Palana
Browse files

update cmake compiler flags

- disable -Wshadow for c++ (less semi-bogus warnings for constructors)
- make gcc use c99 mode
parent b70df760
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
if(USE_LIBC++)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions(-Wall -Wmissing-prototypes -Wshadow)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wmissing-prototypes")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -std=c99 -Wall -Wmissing-prototypes -Wshadow")
endif()
if(UNIX)
......
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