CMakeLists: Warn when casting away cv-qualifiers from pointers
Warns whenever this type of casting isn't done via const_cast.
This commit is contained in:
parent
47f285249b
commit
0ebad78432
1 changed files with 10 additions and 2 deletions
|
@ -20,8 +20,16 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_compile_options(/W3 /MP /Zi /Zo /EHsc /WX)
|
add_compile_options(/W3 /MP /Zi /Zo /EHsc /WX)
|
||||||
else()
|
else()
|
||||||
add_compile_options(-Wall -Werror -Wextra -pedantic -pedantic-errors -Wfatal-errors
|
add_compile_options(-Wall
|
||||||
-Wno-unused-parameter -Wno-missing-braces)
|
-Werror
|
||||||
|
-Wextra
|
||||||
|
-Wcast-qual
|
||||||
|
-pedantic
|
||||||
|
-pedantic-errors
|
||||||
|
-Wfatal-errors
|
||||||
|
-Wno-unused-parameter
|
||||||
|
-Wno-missing-braces)
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86_64)
|
||||||
add_compile_options(-msse4.1)
|
add_compile_options(-msse4.1)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue